Search code examples
c++xcodeclassundeclared-identifier

Undeclared identifier xcode c++


I just wondering on how do i go about with this it seems like all the forums that i went to do the same as what i did but however when i run.. there is this error.. need help

another thing that i wanna ask is about the int main()

can i creating a file name mission.cpp can i put the int main() there or must i do something else

This is the error that i received..

Undeclared Variable

This is my header fileenter image description here


Solution

  • The lethal combination of include-guards + including the header file in the cpp file + including the cpp file into the header file is leaving undefined stuff.

    Solution: delete the #include "LocationData.cpp" line in your header file.