can't find an answer to this anywhere. haven't used c++ for long. in this file, 512, 256, 4736, and 448 all red-underlined as error 'expecting type specifier'
// AttackSqrs.h
#include <valarray>
#include <vector>
#include <unordered_map>
#include <string>
#include <iostream>
class AttackSqrs
{
public:
AttackSqrs();
~AttackSqrs();
private:
void init();
std::valarray<int> board(512);
std::valarray<int> vrChessPieces(256);
std::valarray<int> vrAttackSqrs(4736);
std::valarray<int> vrNumAttackSqrsEachSqr(448);
};
but when i create this header file:
// diag.h
#include <valarray>
#include <vector>
#include <unordered_map>
#include <string>
#include <iostream>
void init();
std::valarray<int> board(512);
std::valarray<int> vrChessPieces(256);
std::valarray<int> vrAttackSqrs(4736);
std::valarray<int> vrNumAttackSqrsEachSqr(448);
the errors go away. thanks in advance for any help.