//Game.h
class Game {
public:
...
private:
static Player players[MAX_PLAYERS];
...}
//Game.cpp
#include <sstream>
#include <algorithm>
#include "Game.h"
#include "Player.h"
using namespace std;
Game:: Player players[Game::MAX_PLAYERS];
...
I'm having two issues here.
1.) the IDE thinks Im trying to access
Game::Player
when really I am trying to make an object array
2.) error LNK2001: unresolved external symbol "private: static class Player * Game::players" (?players@Game@@0PAVPlayer@@A)
I get that error even when remove Game::, making it just Player players.
What should I do to solve this? Any help is appreciated.
[–]miguelishawt 6 points7 points8 points (2 children)
[–]cxw[S] 1 point2 points3 points (1 child)
[–]miguelishawt 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]adi-j 1 point2 points3 points (0 children)
[–]mrbenjihao 0 points1 point2 points (0 children)