摘要: //利用预编译宏展开特性#define LOCATION Location(__FILE__, __FUNCTION__, __LINE__)inline std::string Location(char *pfile, char *pfunc, int nline){ char buffer[MAX_PATH];// MAX_PATH = 260 sprintf_s(buffer, "%s %s %d", pfile, pfunc, nline); return buffer;}测试了,可行,但,还是用的宏,唔。。。改成这样吧:#define LOCATION Loca 阅读全文
posted @ 2014-01-21 15:53 xiarunliang 阅读(199) 评论(0) 推荐(0) 编辑