I am trying to learn classes by making a simple board game in C++. I have a class named "board" that has two functions, drawBoard and fillBoard. When I'm creating the object in my main function, I seem to have two options.
1) board gameBoard;
2) board* gameboard = new board();
What is the difference between these two? Do I always have to create a pointer when using the 'new' operator? I'm mostly trying to understand what situations I would use one over the other in.
Also, when I define it as a pointer, do I always have to use the "->" instead of the dot when calling functions?
board.drawBoard(); versus board->drawBoard();
What is different between these two?