I am using CodeBlocks to learn C++. The problem I'm having is I created a class. Like 2 other files, a .cpp and a .h file. I'm getting errors and I don't know why. TIA for your help
errors -
undefined reference to 'NewClass::NewClass()'
undefined reference to 'NewClass::printSomething()'
undefined reference to 'NewClass::printSomething()'
error: id returned 1 exit status
Your CodeBLocks project or whatever COdeBlocks calls it doesn't have NewClass.cpp in it.
Also, NewClass.cpp line 11 is missing a semi-colon. Because the compiler didn't warn you about that, we know for certain that the compiler isn't compiling that file at all.