I'm not even sure if that's the right way to phrase my question. basically I have a class Game, and I'm trying to do something like:
Game game;
std::vector< std::vector<char> > gameBoard;
gameBoard = game.initVector(rows,rowSize);
and in game.hpp:
class Game{
public:
Game();
//method to initialize the start vector
std::vector< std::vector<char> > initVector(int rows, int rowSize);
...}
and when I try to link I'm getting the following error:
...test-game.cpp:15: undefined reference to 'Game::initVector(int,int)'
What's happening here? How do I eliminate this?