Rank: Administration
Groups: AcademicCoachingSchool, admin, Administration, BookSeller, CatholicSchool, CoachingAdult, CoachingProfessional, CoachingSports, ExtraCurriculumCoaching, IndependentSchool, Moderator, MusicTeacher, PrivateSchool, PublicSchool, SelectiveSchool, tutor Joined: 23/11/2008(UTC) Posts: 523
|
C++ Namespace definitions go in header or source files? Namespace is a way to group types. It does not matter where the namespace is. The compiler append namespace before every type name inside it. However it is preferred to be in the header file because there is too much chance for mistakes - if you put it in the source (.cpp) file, one source file that #includes the header might not use the same (or any) namespace.
|
|
|
|
Rank: Member
Groups: Member
Joined: 10/01/2011(UTC) Posts: 1
|
|
|
|
|
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.