char first[15]; char second[15]; clrscr(); cout<<"Enter the first word: "; cin>>first; cout<<"\nEnter the second word: "; cin>>second; if(first==second) cout<<"\n\nEQUAL"; else cout<<"\n\nNOT EQUAL"; |
|
|
std::string first, second;
|
|
strcmp(first, second)
which is in <cstring>