More Group Sites
School Rankings
Jobless Net
Better Home
Enviro++


Help | Subscribe/Unsubscribe | Rules | Other Group Sites: Better Education | Better Education Forum
Welcome Guest Search | Active Topics | Members | Log In | Register

C++ Namespace definitions go in header or source files? Options · View
hong
Posted: Sunday, November 01, 2009 2:16:28 PM

Rank: Administration
Groups: Administration

Joined: 11/23/2008
Posts: 335
Points: 711
Location: Australia
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.

Sponsor
Posted: Sunday, November 01, 2009 2:16:28 PM
yanghongyu
Posted: Thursday, March 03, 2011 5:02:56 PM
Rank: Member
Groups: Member

Joined: 1/10/2011
Posts: 1
Points: -3,686
Location: fd
I am glad to sharing your thing, let me know so much about your information
Wes Hopkins jerseys
Users browsing this topic
Guest


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.

Main Forum RSS : RSS

ASPNET Theme created by Boskone (Dan Ferguson)
Powered by Yet Another Forum.net version 1.9.1.8 (NET v2.0) - 3/29/2008
Copyright © 2003-2008 Yet Another Forum.net. All rights reserved.
This page was generated in 0.058 seconds.