I have a similar problem to this but not the exact.
Assuming we have 2 header files and a main.cpp. In the first header file we have :
namespace Logic
{
class GameManager;
}
In the second header:
#include "first_header.h"
class Logic::GameManager
{
public :
void init();
void run():
};
And in the main.cpp i have :
#include "first_header.h"
int main()
{
Logic::GameManager gm;
gm.init();
gm.run();
}
I get this error until i include the second header in main.cpp :
'gm' uses undefined class 'Logic::GameManager'
-Is this way of using namespaces and classes correct ?
-Is there a better way to do this?
Thanks.