I'm new to C++, started learning it recently, just got a question in regards to classes.
I have some familiarity with how they work (studied Java previously), but have an issue with regards to creating a complete "project" (meaning a Visual C++ / DevCpp "project")
I'm currently taught to create class definition in a header file, so if my class is called MyClass, create a MyClass.h, then #include that in a main .cpp file.
However, my tutor mentioned something about creating a MyClass.h, then actually defining all the functions for it in a corresponding MyClass.cpp file, finally using a driver main.cpp which links it all together.
I can define MyClass.h functions in main.cpp, but if i try to define the functions in MyClass.cpp i get compiler errors..
Any advice? Not wanting anyone to do my homework for me, just wondering what is the preferred method for creating classes / where to define class functions / how to link into driver file (main.cpp).
sorry for long first post!