#define print_int(a) printf("%s : %d\n",#a,(a))
int y=10;
print_int(y)
i am taking a class and have been asked to explain why this is bad... So i guess stringifing #a is the problem. It does work, so why is it dangerous?
#define print_int(a) printf("%s : %d\n",#a,(a))
int y=10;
print_int(y)
i am taking a class and have been asked to explain why this is bad... So i guess stringifing #a is the problem. It does work, so why is it dangerous?
>>i am taking a class and have been asked to explain why this is bad
Beats me. If you find out please post the reason so we can all learn something.
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.