// xxx.h
namespace A
{
#define xxx() xxxxx
}

// 在其他文件中,引入xxx.h文件,使用宏定义时,不需要加命名空间
// yyy.cpp
#include "xxx.h"
// somd code
void func() 
{
    // 正确
    xxx() 
}

 

相关文章:

  • 2021-11-06
  • 2022-01-23
  • 2021-04-22
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2021-05-20
  • 2022-12-23
  • 2021-12-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案