Dieser Code funktioniert und läuft gut mit g ++. Ich weiß nicht warum. Es sollte einen Fehler geben.Ein zusätzlicher umgekehrter Schrägstrich beeinflusst mein Programm nicht. Warum?
#include <iostream>
using namespace std;
int main(){
int x=9;
int y=6;
//note that there is extra backslash in the end of if statement
if(x==y)\
{
cout<<"x=y"<<endl;
}
//note that there is extra backslash in the end of if statement
if(x!=y)\
{
cout<<"x!=y"<<endl;
}
return 0;
}
Warum Sie nicht das Gefühl, dass es sollte nicht kompilieren? –