The preferred method is to use C++ string objects:
Code:
#include <iostream>
#include <string>
std::cout<<"Do you want to continue? (yes/no): ";
std::string s;
std::getline(std::cin, s);
if (s == "yes")
continue;
else
break;
You can also use the "poor man's strings", but then you end up having to use strcmp:
Code:
#include <cstring>
#include <iostream>
std::cout<<"Do you want to continue? (yes/no): ";
char s[BUFSIZ];
std::cin.getline(s, sizeof s);
if (std::strcmp(s, "yes") == 0)
continue;
else
break;