Hi,
I have a problem in evaluating a macro in this code:
#include<iostream>
#define _A_ some
#define Func _A_Func
using namespace std;
int someFunc(int i)
{
return i;
}
int main() {
cout<<Func(1);
}
I get an error:
test.cpp: In function ‘int main()’:
test.cpp:13:13: error: ‘_A_Func’ was not declared in this scope
So the second evaluation of'A' to 'some' didn't take place, I would like to ask why there is no recurive evaluation of macros? and if there is a straight forward solution to this.
Thanks!