class Board
{
public:
void Solve();
private:
vector<int> intVectorOne(N); /*where N is user defined, somewhere else in my program)*/
int is_valid();
}
int is_valid()
{
for (int i = 0; i < N-1; i++)
{
for (int j = i + 1; j < N; j++)
{
if (intVectorOne[i]=intVectorOne[j]//ERROR: Identifier 'intVectorOne' is undefined.
{/*stuff*/}
}
}
}
void Board::Solve()
if(is_valid())
{
//stuff
}
Board is a class. Classes have constructors. Constructor initializes an object when the object is created. Part of initialization is the creation of the member variables. Read about class member initializer lists.