aboutsummaryrefslogtreecommitdiff
path: root/mod_10b/source.cpp
blob: 3c6b551ffb0356e0f58ceaa69162bf6faaa8680e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
/*Tyler Taormina
 * Source.cpp
 */
#include "source.h"

vold getFullName(char& first, char& last, char& full)
{ 
  cout<<"Please enter your First name: ";
  cin.getline ( first, 50 );
  cout<<"Enter your last name: ";
  cin.getline ( last, 50 );
  full[0] = '\0';            // strcat searches for '\0' to cat after
  strcat ( full, first);     // Copy name into full name
  strcat ( full, " " );      // We want to separate the names by a space
  strcat ( full, last); // Copy lastname onto the end of fullname
  cout<<"Your full name is "<< full <<"\n";
  cin.get();
}