+ 2
why separate class file is created in c++ ?
3 odpowiedzi
+ 2
It's not necessary to create a separate files. Files are separated for better readability. For eg. You just want to know WHAT a particular class can do. You are not interested to see HOW it does. In that case, all you need to see is the structure of the class. You can write unlimited code in single file but when the original coder is gone or when you need to change or debug, it'll be a nightmare to search amongst millions of line of code. Rather, separate files give you a modular structure. Not only it promotes reuse but also makes the design manageable to understand and debug.
0
Well explained, thanks.
0
For time pass