pghsteelers
Technical User
Can anyone answer this very lame question that I just can't see why....why does it return the error
"error C2181: illegal else without matching if"
If I remove the cout line for the first expression it will stop giving me the error. So I don't see what is wrong with the line
if (n == 1)
cout << "N is " << n << endl;
return 1;
else
return n;
"error C2181: illegal else without matching if"
If I remove the cout line for the first expression it will stop giving me the error. So I don't see what is wrong with the line
if (n == 1)
cout << "N is " << n << endl;
return 1;
else
return n;