Original Post
I have a class (Screen) with an internal member of type OutputArea* which is called ScreenOutputArea. To set this internal member I have a method which looks something like this.
void Screen::SetOutputArea(OutputArea* newOutputArea)
{
ScreenOutputArea = new OutputArea(*newOutputArea);
}
ScreenOutputArea is type OutputArea*. And the OutputArea class has its copy constructor defined to accept a reference to OutputArea.
At first I thought this was ok, but now I am getting a run-time crash somwhere around this class and I think this may be the problem. Can anybody see any probs with this?
Thanks in advance.
Mark Coleman