#include "stdafx.h" #include <iostream> #include <string> using namespace std; #define GET_NAME(n) #n int main() { int StageNumber = 1000; string str = GET_NAME(StageNumber); cout << str << endl; return 0; }결과 출력 : "StageNumber"
#include "stdafx.h" #include <iostream> #include <string> using namespace std; #define GET_NAME(n) #n int main() { int StageNumber = 1000; string str = GET_NAME(StageNumber); cout << str << endl; return 0; }
결과 출력 : "StageNumber"