#include <iostream> #include <string> int main() { using namespace std; cout << "What is your name son!?" << endl; string name; cin >> name; cout << name << ", hmm, strange name, never mind that!" << endl; cout << "I have a quest for you, are you interested?" char I will.; I will not.; string I will.; string I will not.; cin >> I will.; cin >> I will not.; if (I will not.) cout << "Okay then, be gone mortal!" << endl; if (I will.) cout << "I need you to save the villagers, in the east from a rising golblin attack to prove to me you are worthy." << endl; return 0; }
char I_will;//never ever use space in vars or point string I_will = "I will."//declare the string and fill it; if (compare( I_will, "I will not.") == 0 ) //compare ( result is 0 for true) => tutorial
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)