[need help][c++][beginner] x does not name a type
i was trying to implement Map class in c++ using Node and Point classes. the map represents the Cartesian coordinates system (x and y axes) so essentially it has an origin. now when i try to set a value (0,0) to the origin I get the error: ./Playground/file0.cpp:75:5: error: 'origin' does not name a type 75 | origin.setPoint(0,0); | ^~~~~~ I tried to look up the solution on stackoverflow and other websites but the situations were different than mine. for example some suggested that the classes that i'm using further in my code should be implemented in upper code lines . i tried that by putting the Node Class higher than map class in the code but nothing changed. I'm a newbie at c++ I'd be very thankful if someone could help me with this. Also if there are any general suggestions/ problems through the code I'd love to hear how i could improve. Thanks in advance the code link: https://code.sololearn.com/cdkPEhWT1f1D