#include <iostream>

#include <stdlib.h>

#define name_to_str(name)(#name)

int main()

{

  int sum = 10;

  std::cout<<name_to_str(sum)<<std::endl;//调用宏输出char*型“sum”

  system("pause");

  return 0;

}

相关文章:

  • 2021-10-07
  • 2021-08-02
  • 2021-12-29
  • 2022-12-23
  • 2022-12-23
  • 2021-06-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-24
  • 2021-07-16
  • 2022-02-08
  • 2022-01-06
  • 2022-12-23
相关资源
相似解决方案