心渐渐失空

导航

2015年10月17日 #

C中变量名通过宏定义转换成char*类型字符串

摘要: #include #include #define name_to_str(name)(#name)int main(){ int sum = 10; std::cout<<name_to_str(sum)<<std::endl;//调用宏输出char*型“sum” system("pause... 阅读全文

posted @ 2015-10-17 11:02 心渐渐失空 阅读(1214) 评论(0) 推荐(1)