コードの小さなスニペットを次に示します。
#include <iostream>
using namespace std;
#define myptr int *
int main(){
myptr p,q;
int c;
p = &c;
q = &c;
c = 2;
cout<<c<<endl;
cout<<*p<<endl;
cout<<*q<<endl;
return 0;
}
p
has typeint*
ながらq
has type int
. なぜこうなった ?