SW 개발/C++/MFC

변수명 가져오기

Lazineer 2012. 11. 23. 16:39

#include "stdafx.h"

#include <iostream>

#include <string>

using namespace std;


#define GET_NAME(n) #n


int _tmain(int argc, _TCHAR* argv[])

{

int asdf = 1000;

string str = GET_NAME(asdf);

  cout << str << endl;

return 0;

}