/* ___________________________________ D A T A E N T R Y P A R T 2 Simple Console Read/Write Demo Native Code Version This shows how to get user input and then show the full concatenated name Run without debugging (CTL-F5) */ //---add the usual suspects! #include "stdafx.h" #include #include using namespace std; int main () { //---create 2 places to hold the data string user_first_name; string user_last_name; cout << "Welcome to Data Entry Part 1!\n\n"; //a welcome prompt //STEP 1: INPUT cout << "Please enter your first name: "; //prompt them for their first name cin >> user_first_name; //store what they typed in RAM cin.ignore (); //clear the keyboard buffer/memory cout << "Please enter your last name: "; //Prompt for last name cin >> user_last_name; //get it cin.ignore (); //STEP 2: PROCESS THE DATA string user_full_name = user_first_name + " " + user_last_name; //STEP 3: NOW DISPLAY THE OUTPUT cout << "\n\n\nYour name is: " << user_full_name << "\n"; return 0; }