I am writing a C++ Tic Tac Toe game, and this is what I have so far:
#include <iostream>
using namespace std;
int main()
{
board *b;
b->draw();
return 0;
}
class board
{
void draw()
{
for(int i = 0; i < 3;++i){
cout<<"[ ][ ][ ]"<<endl;
}
}
};
However, when I created the pointer to board, CodeBlocks gave me an error: 'board' was not declared in this scope. How do I fix this? I am a new C++ programmer.