Have you added the following piece of code to your program?
Code: c++
string NewStudentID=StudentID.substr(2,3);
cout << LastName << ", " << FirstName<< ", "<< FirstName <<LastName<<NewStudentID<<"@student.college.net\n\n ";

You can take reference from the running program that i posted in my first reply.

Last edited by poornaMoksha; 13Sep2011 at 10:56.. Reason: Providing More info