본문 바로가기

컴퓨터 과학 & 영상처리 관련/C / C++

매크로 인수 연산 #x

#include <stdio.h>


#define PR(x) printf(#x " = %d\n",x)


int main(void)

{

int x = 250, y =747;

PR(x);

PR(y);


return 0;


}


결과

x = 250

y = 747