Extremely simple program not compiling
Oct 4, 2016 at 5:50am
I get compiler errors about ambiguous overload for the following code and I'm not sure why.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
|
#include <iostream>
using namespace std;
int main(){
string input = "";
do {
cout << "Want to continue? y/n" << endl;
cin >> input;
}
while (input =! "n");
return 0;
}
|
It's a simple program to continually ask user something until he enters "n", which will then terminate the program.
Much appreciated.
Oct 4, 2016 at 6:09am
Change =!
To !=
;)
Oct 4, 2016 at 6:16am
Oh my god, I need to go to sleep. Thanks.
Topic archived. No new replies allowed.