यह कोड काम करेगा और g ++ के साथ ठीक चल जाएगा। मुझे नहीं पता क्यों। यह एक त्रुटि देनी चाहिए।एक अतिरिक्त बैकस्लैश चरित्र मेरे प्रोग्राम को प्रभावित नहीं करता है। क्यूं कर?
#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;
}
तुम क्यों महसूस करते हैं कि यह संकलन करने में विफल करना चाहिए:
वास्तव में के बराबर है? –