The purpose of this lab is to work with the cstring library and files.
Today's program is to create login ids from student names. The data file
consists of one name per line and is of the format:
Last, First
The login ids should be created as FLLLDD, where
F is the first letter of the first name,
LLL are the first three letters of the last name,
and DD are digits 00, then 01, then 02,...
- copy the data file to your working directory
- Look at the format of the data file
- examine the code linked here
This code reads data from the file and places upto 20 characters of each line
into the character array temp.
- Next, temp will be placed into the names array using strcpy;
a function to print all of the names in the names array would need written
- This code is up to this step
Output
- Finish the update function to transform
the array of strings to be the login ids formatted as FLLLDD as described above
Have the main print out the array of three strings
Upload your code and the output to the D2L Lab dropbox named FileEcllipse