hi there.
i just started studying c++ and i was doing an excercise when i started having these problems with classes.
I'm using Dev-C++ to write my code since i found it very simple, and i'm on windows 10.
Errors:
[Error] expected unqualified-id before '{' token (in GradeBook.h line 6, col 1)
[Error] variable 'GradeBook mio' has initializer but incomplete type (in main line 8, col 15)
We crossed over posts so see my version. If you keep the program in the (usual) 3 separate files just split it up accordingly and #include in each file as you need them for that file alone.
~GradeBook(){}; what is this?
i tried to make the changes like you, but still it doesn't work
it gives the same error
it must be said that i am working on 3 separated files in the same folder
okay i swear i'm even doing ctrl+c / v
i tried your code in a new folder with new files now i have new errors
main.cpp:(.text+0x45): undefined reference to `GradeBook::GradeBook(std::string)'
main.cpp:(.text+0x6d): undefined reference to `GradeBook::getNomeCorso()'
main.cpp:(.text+0xa5): undefined reference to `GradeBook::displayMessage()'
[Error] ld returned 1 exit status
I think most people here will tell you dev c++ is rubbish, CodeBlocks not much better - so VS would definitely be a good move. (Cheaper than a Mac too!)
yo i installed visual studio and it works.
Thank you very much for your help.
(after all the time i spent on trying to resolve this problem i nearly cried when i saw the console)