undeclared identifier

Jul 7, 2021 at 5:23pm
I have included my class in the main.cpp file but I get this error.
error C2065: 'coordinate': undeclared identifier
error C2065: 'connectivity': undeclared identifier
I can't figure out why. I appreciate your help in advance,
Last edited on Jul 10, 2021 at 11:07am
Jul 7, 2021 at 5:34pm
coordinate and connectivity are local to the functions in which they are defined.
They no longer exist when those functions end.
And you wouldn't be able to access them from outside the funcion anyway.
Presumably you mean them to be members of the class?
Jul 7, 2021 at 5:59pm
Yes,
How can I access them?
Last edited on Jul 7, 2021 at 7:03pm
Jul 7, 2021 at 10:47pm
By making them members of the class.
Jul 7, 2021 at 10:56pm
My question may seem silly, but can I define something like double **coordinate and int **connectivity in the private part of the class?
Last edited on Jul 7, 2021 at 10:56pm
Jul 7, 2021 at 11:38pm
I can't comprehend your code and have no idea what it's up to so I'm not sure what's reasonable here. For instance I don't see where you're assigning any memory to m_data. And I assume this is just a placeholder: return gx1, gy1, gx2, gy2, gx3, gy3;
Topic archived. No new replies allowed.