0
So we need to create both Myclass.h & myclass.cpp files on all programs?
5 ответов
+ 11
No. Your class definition can exist within your class header (or simple within your main.cpp).
0
thanks:)
0
If you want you can put everything in the same file. It is just not good for maintenance.
0
I'd prefer putting everything in same file..cuz making two files is umm complicated
0
Hatsy, sometimes you don't want your client to have access to your compiled code, but you want them to knoe the interface to use your code. That is one reason to separate in header and implementation.