Let me start by saying I\'ve extensively searched for answers on google and more specifically here.
The thing is I actually (at least I think I did) found people wit
You need to put the definition of your Player class in the header file, before you declare the extern variable. Otherwise the compiler has no idea what Player is.
I suggest something like this:
player.h
#ifndef PLAYER_H_
#define PLAYER_H_
class Player {
...
};
#endif
player.cpp
#include "player.h"
Player john;
cc.h
#ifndef CC_H_
#define CC_H_
#include "player.h"
extern Player john;
#endif