You have been provided with a QTCreator project called Project13 _ Student. Open the project in QTCreator and make the necessary changes to the main.cpp file. You have been provided with file named Data.txt. Data.txt contains information about students. Each line contains the information for one student. The student information is seperated by a comma and is in the following format : Name,Surname,Email,Age,StudentNumber Notice how the first line in the file contains a heading. This line should be ignored by your code when processing the file. You may not modify the Data.txt file. Write the code for the function named splitSingleStudent ( string[],string ) . splitSingleStudent receives an array and a signle line from the file as parameter. The function then splits the line received from the file and loads the array parameter with the correct values. The array parameter should be loaded as follows : Index 1 : Name Index 2 : Surname Index 3 : Email Index 4 : Age In the main function open the file named Data.txt and read from the file the information for the first student only into the array named stdentDetAr. Make use of the function splitSingleStudent ( string[],string ) .
You have been provided with a QTCreator project called Project13 _ Student. Open the project in QTCreator and make the necessary changes to the main.cpp file. You have been provided with file named Data.txt. Data.txt contains information about students. Each line contains the information for one student.
The student information is seperated by a comma and is in the following format :
Name,Surname,Email,Age,StudentNumber
Notice how the first line in the file contains a heading. This line should be ignored by your code when processing the file.
You may not modify the Data.txt file.
Write the code for the function named splitSingleStudent ( string[],string ) .
splitSingleStudent receives an array and a signle line from the file as parameter.
The function then splits the line received from the file and loads the array parameter with the correct values. The array parameter should be loaded as follows :
Index 1 : Name Index 2 : Surname Index 3 : Email Index 4 : Age
In the main function open the file named Data.txt and read from the file the information for the first student only into the array named stdentDetAr.
Make use of the function splitSingleStudent ( string[],string ) .
Step by step
Solved in 2 steps with 1 images