>IMHO, this is a very good way to organize things in C++. The h file gives the interface of the class (btw, this is the declaration, not the definition in C++) and the cpp stores the actual implementation (this is the definition). Only the h files are used by other classes/programs. So, if only the implementation is changed, only that class needs to be recompiled.
>
>This makes things clear (because it clearly separates the interface from the implementation) for programmers and easier to understand. Java doesn't support header files, so, Java code is many times more difficult to follow.
>
>Vlad
>
>>With C++ the class definition must be in a header file, while the implimentation is in the CPP file. This can make it difficult to keep things organized.
I prefer the opposite. Programming always seems to come down to esthetics.
Précédent
Suivant
Répondre
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement