Hello,
So I've got a code where I'm wanting to make sure that there is nothing in this class variable "finalgrid". To do this I've got an if statement:
if(canvas->finalgrid)
OR
if(finalgrid)
Sorry for the confusion with the two statements, but I'm working on modifying one project to fit in another, (wrapping a glui project with wxWidgets). Unfortunately, the gluiproject without the canvas-> works properly and appears to be the same as the modified project, but when I put a break point at the if statement, this is what I see as a discrepancy.
canvas->finalgrid = 0xcdcdcdcd {BoundaryVertices=??? GridSquareVertices=??? GridSquareFlag=??? ...}
finalgrid = 0x00000000 {BoundaryVertices=??? GridSquareVertices=??? GridSquareFlag=??? ...}
I didn't think that with either of their contents, either should enter the if statement, but actually the canvas->finalgrid does enter it, and I'm guessing it might have something to do with 0xcdcdcdcd but I'm not sure. The finalgrid does not enter the if statement, and I'm not sure why its address is 0x0000000.
If anyone can shed some light onto this situation, I would be delighted! Thanks in advance and if I didn't make anything clear enough please let me know.
Note: these were instantiated as dynamic instance of another class
GridGeneration *finalgrid;
I'm not initializing it, so I'm not wanting anything to be in the variable, meaning I do NOT want it to enter that if statement, but unfortunately it is in the case of (canvas->finalgrid).