Class - pointer - reference problem???
· March 11, 2015
I have been trying to integrate 2 classes, learn pointers, and use multiple files...
I think for the most part it's going pretty well. However I have ran into a problem I can't seem to figure out. If I strip out the Item class, it works fine, if I put the item class back in I get the error in the Room class...
The complete code is here:
C:/Adventure/adventure/main.cpp:144: undefined reference to `Rooms::changeRoom(std::string)'
C:/Adventure/adventure/main.cpp:145: undefined reference to `Rooms::changeRoom(std::string)'
C:/Adventure/adventure/main.cpp:146: undefined reference to `Rooms::changeRoom(std::string)'
collect2.exe: error: ld returned 1 exit status
Process terminated with status 1 (0 minute(s), 0 second(s))
3 error(s), 0 warning(s) (0 minute(s), 0 second(s))
I also see in the debugger message collect2.exe error ??? What is that?
I'll take any advice you'd like to offer on the problem, or the over all code. Thanks guys, be brutal, I can take it. It's a good way to learn.
Post a Reply
Nothing to see here.
Used in many types of software including music players, video games, and many large scale applications.
|Bucky Roberts Administrator|