Write a C++ program that will read user's full name into a C-string. User will enter first name followed by one or more spaces and then the last name. Also, obtain user's student ID also into a C-string. Pass the name and ID obtained along with another C-string to a function which will generate user name for campus computers from the full name and student ID into the third string parameter. the ID will be made up of the first two letters of the first name, followed by the first two letters of the last name, followed by the last 5 digits of the student ID. In main, print the user full name (fist name followed by one space and then the last name) and the user ID.
i dont know how to pass the name and id into the function.
this is my program so far:
#include <iostream>
#include <cstring>
using namespace std;
int main ()
{
char fullname [50];
char id [20];
cout << "Enter student fullname: ";
cin >> fullname;
cout << "Enter student's id:";
cin.getline ( id, 20, '\n' );
cin.get();
system ("pause");
return 0;
}