strcmp takes C-style strings, not C++ string objects. The string class has overloaded the relational operators, so you can use < and > to compare them. But if you have your heart set on strcmp, you can do this:
x = strcmp(word1.c_str(), word2.c_str());
Reputation Points: 6442
Solved Threads: 1393
Bad Cop
Offline 11,807 posts
since Sep 2004