string name1;
while (getline(cin, name1)) {
...
continue;
}
break;
}
...
string name2;
while (getline(cin, name2)) {
...
}
else if (strcmp(name1, name2) == 1)
cout << "..." << endl;
}
if (strcmp(name1, name2) == 1)
The strcmp() and strncmp() functions return an integer less than,
equal to, or greater than zero if s1 (or the first n bytes thereof)
is found, respectively, to be less than, to match, or be greater than
s2.
if (strcmp(name1.c_str(), name2.c_str()) == 0)
name1.compare(name2); //strcmp()
name1 == name2; //operator==