Possible Duplicate:
Programmatic way to get variable name in C?
I have checked some of the blogs before posting this here. I have tried the following snippet...
int a=21;
int main()
{
cout<<#a<<a<<endl;
return 0;
}
I am using g++ compiler on ubuntu 10.04. And I am getting the following error:
sample.cpp:17: error: stray ‘#’ in program.
Please suggest me how to print the variables name .