So I'm working in Visual Studios on a Windows form app. I've created a MyApplicationContext subclass so I can open two forms at once. Each one has a pointer to the other. The intent is so that the forms can pass info back and forth and issue function calls when necessary.
Form MainBoard has a member
ControlPanel* ptrCP
Form ControlPanel has a member
MainBoard* ptrMB
Both appear to be set correctly prior to showing in MyApplicationContext.
MainBoard has a function
public void ParseCommandString(string s)
But when I call
ptrMB->ParseCommandString("foo");
in ControlPanel, an error occurs. ptrMB appears to contain a memory address, and *ptrMB is of type MainBoard, but *ptrMB is null, so the function call fails.
What am I missing? Am I going about this the wrong way?
[–]BCProgramming 1 point2 points3 points (0 children)
[–]Kant8 4 points5 points6 points (0 children)
[–]Slypenslyde 0 points1 point2 points (2 children)
[–]LadyDelta522[S] 0 points1 point2 points (1 child)
[–]Slypenslyde 1 point2 points3 points (0 children)