|
From: Nathan S. <liv...@ho...> - 2003-09-23 21:58:20
|
I'm not sure, but I think this depends on the type of 'letter2' in the =
if statement. Your example code showed: value letter
I don't know if you meant letter2 there, but if so.. you are using an =
enum in your conditional, so this code would be working as expected.
Someone more learned would know more about this.
----- Original Message -----=20
From: -=20
To: dev...@li...=20
Sent: Wednesday, September 24, 2003 6:00 AM
Subject: [Dev-C++] IF
problem with if statement:
if (letter2 !=3D 'u' || 'v' || 's' || 't' || 'a') {
cout<<"An error has occured, check you typed in only u, v, s, t or =
a."<<endl;
exit();
}
Compiles ok but after checking i've realised it believes the values =
are part of an earlier enum declaration:
enum value{u,v,s,t,a};
value letter;
How do i tell the compiler i want charactors, not enum values? |