S
sam_cit
Hi everyone,
I have the following piece of code,
#include <stdio.h>
#include "sample1.h"
int x = 10;
namespace first
{
int x = 5;
}
//using namespace first;
int main()
{
using namespace first;
printf("%d\n",x);
return(0);
}
when i compile i get an error saying 'x' : ambiguous symbol, my
requirement is to make sure main() uses variables in first namespace
rather than global namespaces, can anyone help me regarding this?
I have the following piece of code,
#include <stdio.h>
#include "sample1.h"
int x = 10;
namespace first
{
int x = 5;
}
//using namespace first;
int main()
{
using namespace first;
printf("%d\n",x);
return(0);
}
when i compile i get an error saying 'x' : ambiguous symbol, my
requirement is to make sure main() uses variables in first namespace
rather than global namespaces, can anyone help me regarding this?