Code needed!

How to compare a word with other word. can anyone give me a sample code for this!
Just like dictionary or passwrod!
Using C++:
1
2
3
string word = "Hello";
if ( word == "Hello" )
    //... 

Using C:
1
2
3
char *word = "Hello";
if ( !strcmp(word, "Hello") )
    //... 
http://www.cplusplus.com/reference/clibrary/cstring/strcmp.html
Last edited on
Where the user will be asked for entering his word which would be compared with the *word?
Topic archived. No new replies allowed.