C++ Learning Community Forum
September 09, 2010, 07:44:48 AM *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Hello. Smiley
 
   Home   Help Search Login Register  
Pages: 1 [2]
  Print  
Author Topic: Namespace  (Read 2576 times)
Shonoby
Programmer
Dr. of C++ology
****
Posts: 659


Pixel Artist


View Profile
« Reply #15 on: April 11, 2007, 06:04:52 AM »

Well, really it does not affect the coding in low-level portions. But when u get into high-leveled coding ( i.e. coding a network or what-not ). This could get buggy ( as-far as i know ), but i just made this topic to try to have this use more commonly for one reasons: improve readability( have u ever seen 1 of my codes i make them very neat( my book taught me ) ). But if u feel more comfortable with namespace; than by all means use it. But once again these are C++ Tips they are to warn u or help u with any problem( that is common ).
Logged

Reality is what we make of it, so by definition we're all living in a fantasy.
- Shonoby
akuyume
tubapro12
N00b!!1
*
Posts: 5


View Profile
« Reply #16 on: April 12, 2007, 09:12:47 PM »

Personally, I tend to avoid using using namespace for anything but std, but I create practically all of my objects in their own namespaces to avoid conflicts so I view it as harmless to use using namespace std.  Only time I make exceptions to my habit is when third party libraries I intend to use might conflict with a name declared in std.
Logged
FrozenKnight
Extends without bound
Global Moderator
Dr. of C++ology
*****
Posts: 556


Do it yourself it's the only way to learn.


View Profile
« Reply #17 on: April 12, 2007, 11:15:17 PM »

hide some code in the program that prints your name onto the screen when the program is run and try to make it so that the program won't run correctly without it. (a easy way is to make all the formating on the screen rely on it being there.) then just limbed it into all of your programs. Cheaters hate that.
Logged


Imagine the impossible, then make it happen.
C-Man
Does anyone even read this ?
Global Moderator
Dr. of C++ology
*****
Posts: 988



View Profile WWW
« Reply #18 on: April 13, 2007, 11:39:43 AM »

nice one Tongue
Logged

danong
N00b!!1
*
Posts: 17


View Profile
« Reply #19 on: May 16, 2007, 07:45:14 PM »

well, i use them less as they're annoying sometimes  Embarrassed havin myself to remember wht kind of namespace i'd created, but i do declare them for some purpose to avoid overlappin of the codin, for say, 2D & 3D math n phy stuffs, some calculation may bias on the different stat.

But today i'd learnt sth : not to get stolen by other ppl , nice idea , perhaps i ll try  Cheesy
Logged
Pages: 1 [2]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!