Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <string>
- using namespace std;
- int main()
- {
- string name;
- char testArray[5] = { 'F', 'e', 'l', 'i', 'x' };
- cout << "Type in your name: ";
- cin >> name;
- if (name[0] == testArray[0])
- {
- cout << "Wow my name also starts with a F" << endl;
- system("pause");
- }
- else
- {
- cout << "Cool name I guess.." << endl;
- system("pause");
- }
- return 0;
- }
Add Comment
Please, Sign In to add comment