Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using namespace std;
- string fname, lname;
- string info[2][2] = {
- {"Write your First Name: ", "fname"},
- {"Write your Last Name: ", "lname"}
- };
- void getInfo(){
- for(int i = 0; i < 2; i++)
- {
- cout << info[i][0];
- getline(cin, info[i][1]);
- }
- string welcomeMassage = "Hello: " + fname + " " + lname;
- printf(welcomeMassage.c_str());
- }
Add Comment
Please, Sign In to add comment