0

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?

dawich77
  • 92
  • 1
  • 3
  • 11
  • [See this question.](http://stackoverflow.com/questions/12573816/what-is-an-undefined-reference-unresolved-external-symbol-error-and-how-do-i-fix) – chris Mar 05 '14 at 05:29
  • Learn to prepare a [minimal complete example](http://www.sscce.org), and you'll see most of the mystery of these problems vanish before your eyes. – Beta Mar 05 '14 at 05:32

0 Answers0