how come this won't work??????
does anyone know how I could get this same effect.Code:if (cor=="n"||cor=="N")
how come this won't work??????
does anyone know how I could get this same effect.Code:if (cor=="n"||cor=="N")
>if (cor=="n"||cor=="N")
You can't compare strings like that. But I think you did want to compare cor with the characters n and N, which goes like this:
if (cor == 'n' || cor== 'N')
"n" and "m" are strings.
I declared it as a char here is the input line
Code:cout<<"\n You Have Chosen To Add A New Record.\n Is This Correct: "; cin>>cor; if ( strcmp(cor,"n") == 0 || strcmp(cor,"N") == 0 )
Jeff Paddon
Undergraduate Research Assistant
Physics Department
St. Francis Xavier University