标签: c++ operator-overloading operators user-defined
'因为每当我尝试以下其中一行时:
#define and && #define or || #define not !
我收到错误:
1:9: error: "not"/"and"/"or" cannot be used as a macro name as it is an operator in C++
答案 0 :(得分:1)
这些关键字已经定义。请看一下http://en.cppreference.com/w/cpp/language/operator_alternative