we're dealing the following problem:
d:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\vector(575):
error C2440: 'initializing' : cannot convert from 'const Game' to
'Game'
This error comes because of the following:
Game newGame(numPlay ers, playerNames, boardKind);
games.insert(ga mes.end(), newGame);
games is a vector <Game>
and Game is:
class Game
{
public:
Game(const int numPlayers, const vector <string> playerNames, bool
boardKind);
void playOneRound();
private:
vector <Player> players;
Board board;
Heap heap;
Dictionary dict;
};
We began getting this error only after the field Dictionary dict was
added. The class Dictionary includes ifstream dictionaryFile;
Could this cause this problem?? What could this be?
Please help :(
d:\Program Files\Microsoft Visual Studio .NET\Vc7\includ e\vector(575):
error C2440: 'initializing' : cannot convert from 'const Game' to
'Game'
This error comes because of the following:
Game newGame(numPlay ers, playerNames, boardKind);
games.insert(ga mes.end(), newGame);
games is a vector <Game>
and Game is:
class Game
{
public:
Game(const int numPlayers, const vector <string> playerNames, bool
boardKind);
void playOneRound();
private:
vector <Player> players;
Board board;
Heap heap;
Dictionary dict;
};
We began getting this error only after the field Dictionary dict was
added. The class Dictionary includes ifstream dictionaryFile;
Could this cause this problem?? What could this be?
Please help :(
Comment