Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- string upperCaseIt(string s);
- bool sameString (string s1, string s2);
- int main ()
- {
- char name1, name2;
- cout << "Enter a name: ";
- cin >> name1;
- cout << "Enter another name and I will test if they are the same.";
- cin >> name2;
- if (name1==name2)
- cout << name1 << " is the same as " << name2 << endl;
- if (name1!=name2)
- cout << name1 << " is not the same as " << name2 << endl;
- system ("pause");
- return 0;
- }
- bool sameString (char name1)
- {
- if (name1)
- return true;
- else
- return false;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement