problem feeling in namespaces concept

October 8, 2010 at 01:44:12
Specs: Windows XP
i am trying to sue concept of namespace but i am not getting right i am confused on it
plz help me
namespace foo

int Dosomething(int nX,int nY) // not a class, its gloabal function
return nX+nY;


namespace Go ///go namesapce that have function same as defiend in other namespace file ,not a vlass
int Dosomething(int nX, int nY) //glaobal functions , not class
return nX-nY;


#include "stdafx.h"
#include "foo.h"
#include "Go.h"
#include <iostream>

int _tmain(int argc, _TCHAR* argv[])

using namespace std;
return 0;

I am confused, i got output only 17,why

it should be 1 and and 7..
why its 17 output...

i will be thanks full to all of you..
thanks in advance!

See More: problem feeling in namespaces concept

Report •

October 9, 2010 at 16:15:10
why its 17 output...
It's actually 1 and 7, but you didn't add any line breaks or whitespace, so it runs together.

How To Ask Questions The Smart Way

Report •

October 12, 2010 at 04:09:27
ohhh thanks Mr. Razor..

Report •

Related Solutions

Ask Question