I have a inherited class, and in the baseclass there is a function to load data from a file. In this function I set some variables, like normal integers. With them I have no problems. The inherited class gets those values with no problems. But I also have a pointer defined like this:
CSub* subs;
Now, in the function I do like this:
subs = new CSub[10];
It works perfectly when just running in the base class, but it doesn't work in the inherited class. As soon as it finishes the function it doesn't remember it. It works to access it from inside the function, but I later can't. Then it is as if it was never set. But normal integers work. Someone please enlighten me. What am I doing wrong?