I have bee tasked to create a console app that extracts data from a text file.
The text file consists of Student ID's, Student Names and Mark achieved.
I have figured out how to create a menu and cout the results, but I'm struggling to cout the highest mark gained and lowest mark gained. (These need to be two different functions)
I also need to sort the Students in descending order according to the mark they received.
Welcome to programming. What you thought was programming was in fact memorising syntax. This is programming - thinking about how to solve a problem using the tools available.
How do YOU know which score is the lowest? Look at that list. Start at the top. Now tell me which is the lowest score. How did you do that? It might be something like:
Look at first score. That's the lowest score so far.
Look at next score. If next score is lower than the lowest score so far, it's the new lowest score so far.
Repeat until reached last score.
My problem is integrating the code into my main code.
Please don't. Grabbing code you don't understand and trying to whack it into something it's not suitable for is not a good idea.
My main problem is I'm struggling to put the text file into array and drawing the values from the 3rd column.
You have chosen a particularly complicated way of doing this. You can just read the values one at a time, rather than read in a whole line and then have to break it into pieces.
Here is some code that does what you've done above for reading data, but simpler, and presents the data in a way that it then easy to examine (see the end where I output the values for an example of how to get to the values in the vector).