help with tutorial 45, 46, 47

+1 Lachlan S · April 10, 2015
Can anyone help me with these? does anyone know cans and can'ts of classes and stuff. i have been getting nothing but errors, undefined references, all sorts. I can be more specific but does anyone know general rules.

Some Questions:

people::people ( can the latter be different to the first?)

Pretty much, how can I properly write tutorial 45,46,47 with objects that were named differently to their classes? 

Post a Reply


- page 3
Oldest  Newest  Rating
0 Lachlan S · April 14, 2015
errors are: 
C:\Users\Home\Documents\Me\check\main.o:main.cpp|| undefined reference to `Birthday::Birthday(int, int, int)'|
C:\Users\Home\Documents\Me\check\main.o:main.cpp|| undefined reference to `People::People(std::string, Birthday)'|
C:\Users\Home\Documents\Me\check\main.o:main.cpp|| undefined reference to `People::printInfo()'|
||=== Build failed: 3 error(s), 0 warning(s) (0 minute(s), 1 second(s)) ===|
0 Lachlan S · April 14, 2015
Thanks for the help, i remember un-checking has destructor when i made the program, I made it yesterday to see if it actually run, and then I copied and pasted the entire git-hub document in their respective files just to see if it would work (i wanted to see if it was mine or the programs fault). but ill check it again today.
0 Brian Reed · April 13, 2015
Hello Lachian,

The only thing I can think of from what I can glean about your compiler error is it might have something to do with the "Has destructor" checkbox you selected when creating the class (assuming you're using codeblocks). The totorial shows it needs to be unchecked. So, if it was me, I would just redo this as a new project as I don't know how to check for the selection after the class is created.

If you try making a new project and still can't resolve this issues, please provide the code you're trying to run. I am willing to work with you on this until your problem is resolved.

0 Lachlan S · April 13, 2015
Thanks, but with the tutorials, if I copy everything exactly from the github document, I still get an error (tutorial 46, 47) "||=== Build: Debug in check (compiler: GNU GCC Compiler) ===|
C:\Users\Home\Documents\Me\check\People.cpp|6|error: expected constructor, destructor, or type conversion before '(' token|
||=== Build failed: 1 error(s), 0 warning(s) (0 minute(s), 0 second(s)) ===|" Do you know what is up with this?



Used in many types of software including music players, video games, and many large scale applications.

Bucky Roberts Administrator