このコードをコンパイルしようとすると、次のエラーが表示されます。
main.cpp:19:3: error: invalid operands of types 'void' and 'int' to binary 'operator!='
これはファイルです:
#include <iostream>
#include <cstdio>
using namespace std;
#define $ DEBUG
#define DEBUG 1
#define _(out) do{ std::cout << __FILE__ << ":" << __LINE__ \
<< " " << out << '\n';}while(0)
#define _(out) printf(out);
int main(){
#ifdef LOCAL_PROJECT
#define DEBUG 0
#endif
$ && ({
_("eeeeewe");
});//line 19
return 0;
}
$
は の単純な名前でDEBUG
、実行時は0
または1
です。
コンパイル エラーは、このソース ファイルに対するものです。これを取り除き、コンパイルする方法は?