C++定义了宏但不生效
本帖最后由 dt3tc 于 2019-5-22 17:17 编辑#include <iostream>
#define DISALLOW_COPY_AND_ASSIGN(TypeName) \
TypeName(const TypeName&) = delete; \
void operator=(const TypeName&) = delete
int main(){
std::cout<<" DISALLOW_COPY_AND_ASSIGN(TypeName) "<<std::endl;
return 0;
}
谢谢 " DISALLOW_COPY_AND_ASSIGN(TypeName) "
还可以在""号里面用宏?""里面不应该是代表字符串。
页:
[1]