The ProgrammersTalk Community
Forum Register Search Today's Posts Mark Forums Read
Register

Go Back   The ProgrammersTalk Community > General Programming > C#


Welcome to the The ProgrammersTalk Community forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.
Reply
 
LinkBack Thread Tools    Display Modes   
  #11 (permalink)  
Old 07-08-2007, 11:29 PM
HelloWorld's Avatar
HelloWorld HelloWorld is offline
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,119
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Quote:
Originally Posted by rpgfan3233 View Post
Other than a wrapper to protect code collision and generally wrap code into one single unit, there is no other purpose for a namespace. You can't inherit a namespace to my knowledge, only classes.
much simpler explanation, but thanx with all of the codes, it really helps me a lot to understand when I actually see codes btw, you guys use # for a comment in C++...??

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
  #12 (permalink)  
Old 07-08-2007, 11:51 PM
rpgfan3233 rpgfan3233 is offline
PT Staff
Awards Showcase
Quality Tutorial Quality Tutorial Quality Tutorial Quality Tutorial 
Total Awards: 4
Join Date: Jul 2007
Posts: 118
iTrader: (0)
rpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura aboutrpgfan3233 has a spectacular aura about
No, actually in C++, there are
/* multi-line
comments */

as well as
// single-line comments

the latter of which happen to also be valid in C, but only if you compile against the C99 specification (C programming has two specifications - C89 (1989) and C99 (1999)).

If I used "#" for something like this:
#ifndef _SOMETHING_
#define _SOMETHING_
#endif

then those are actually not comments. #include, #ifndef, #define and #endif are preprocessor directives. That part comes from C and is used in case someone does something stupid like #include <stdio.h> in two different files that are supposed to work together, things like #ifndef serve a very important purpose to prevent clashes with duplicate definitions of functions. It would be like creating a program that uses two Main() methods in C# or two main() methods in Java.

__________________

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
The Following User Says Thank You to rpgfan3233 For This Useful Post:
HelloWorld (07-14-2007)
  #13 (permalink)  
Old 07-09-2007, 08:34 AM
ScottHughes ScottHughes is offline
Novice
Join Date: Jul 2007
Posts: 9
iTrader: (0)
ScottHughes is on a distinguished road
I never knew much about namespaces. Thanks for all the great information!

__________________
Check out the Hunger & Poverty Forums and the Costa Rica Forums!
Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

   Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -7. The time now is 11:00 PM. Powered by vBulletin
Copyright © 2000 - 2007, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO © 2007 ProgrammersTalk Sedo - Buy and Sell Domain Names and Websites project info: programmerstalk.net Statistics for project programmerstalk.net etracker® web controlling instead of log file analysis


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50