namespace

Discussion in 'C Programming' started by sw21, Feb 4, 2010.

  1. sw21

    sw21

    Joined:
    Feb 4, 2010
    Messages:
    1
    Hey
    I was wondering why this is possible :
    Code:
    class A{
    public:
    	int iAddition2(int arg1, int arg2) {
    		return iAddition(arg1, arg2);
    	}
    	int iAddition(int arg1, int arg2) {
    		return arg1 + arg2;
    	}
    };

    and not this:

    Code:
    namespace myNS {
    	int iAddition2(int arg1, int arg2) {
    		return iAddition(arg1, arg2);
    	}
    	int iAddition(int arg1, int arg2) {
    		return arg1 + arg2;
    	}
    }
    
    
     
    sw21, Feb 4, 2010
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Èý¹â
    Replies:
    1
    Views:
    592
    William F. Robertson, Jr.
    Jul 29, 2003
  2. li.eddie@gmail.com
    Replies:
    0
    Views:
    5,156
    li.eddie@gmail.com
    Jan 6, 2006
  3. Anonymous
    Replies:
    3
    Views:
    555
    Ron Natalie
    Aug 18, 2003
  4. Jason Heyes
    Replies:
    1
    Views:
    462
    Woebegone
    Nov 19, 2004
  5. Petter Reinholdtsen
    Replies:
    9
    Views:
    4,421
    Howard
    Nov 29, 2004
Loading...

Share This Page