- #1
adaptation
- 98
- 0
I understand the concept of creating a new header file for a class (something like MyClass.h), but what's the point of creating a MyClass.cpp? http://www.codeblocks.org/" creates both files for me when I add a new class to my project. I'm sure there's a good reason, I just don't know it
In the past, I've only ever used *.h files to define classes. I've always put main() in my main.cpp. I've never had a reason to have more than one *.cpp file in a project. I'm kind of stumped. Is there a principal of OOP that I'm totally overlooking (I'm sure there is/are)?
Thanks in advance for your help.
In the past, I've only ever used *.h files to define classes. I've always put main() in my main.cpp. I've never had a reason to have more than one *.cpp file in a project. I'm kind of stumped. Is there a principal of OOP that I'm totally overlooking (I'm sure there is/are)?
Thanks in advance for your help.
Last edited by a moderator: