In c++,
Part 1. Count the number of lines in afile.
Write a function
int CountLines(string filename)
that takes in the filename as a parameter and returns the numberof lines in the file. Lines are separated the newline character ‘n ’.
Part 2. Parse a file and store the values in avariable.
For this task you’ll be given a file, containing a list ofstudents and their scores in K subjects, where K is an arbitrarynumber. All of these values will be separated by commas. There willbe one student record (Name + K scores) per line. The entire filewill therefore be of this format
Name1, Score1, Score2, Score3
PayPal Gateway not configured
PayPal Gateway not configured