Hello, I´ve got a problem: I have two classes(CXPong and CGame). In the CXPong class, I created a device and stored a Pointer to the Scene Manager(smgr). Now I want to use "smgr" in CGame. How can I do this? I already tried it with a Singleton, but I get an Segmentation Fault, if I try to retrieve the Scene Manager.
E.g.:
CXPong.h:
MrBigBrain wrote:Thanks for the replay. If I store a pointer to the CXPong class, there is no compiler error, but when I execute the App, there is a Runtime Error.
MrBigBrain wrote:Thanks for the replay. If I store a pointer to the CXPong class, there is no compiler error, but when I execute the App, there is a Runtime Error.
Hmm its strange. If I put paddle = smgr->getMesh("test.3DS"); in the CXPong Class it works, but if I put it like this pong->smgr->getMesh("test.3DS"); in the CGame Class the Application crashes.
MrBigBrain wrote:Hmm its strange. If I put paddle = smgr->getMesh("test.3DS"); in the CXPong Class it works, but if I put it like this pong->smgr->getMesh("test.3DS"); in the CGame Class the Application crashes.
Did you create "pong" as an object pointer or just an object?