0
How can i get my program to accept input from users...like a yes or no and after then how can i link it
2 odpowiedzi
+ 1
cin >> varName;
+ 1
You can use a method for input. Like Ariela said, you could use cin for simple inputs like yes or no. If your input has spaces in it, use getline:
string input = "";
cin >> input;
if (input == "yes") {
//Do something
}
// for spaced input
getline(cin, input);