Hi,i have written a programme which asks the user to input a course name and a course code. The program then uses string stream to join the course name and coude together into one string and uses the push_back function to place this in a vector<string>. It keeps on adding more courses to the vector<string> until the user commands it to stop. Hence the program can taken on as many courses as required by the user.
Using iterators i can print out the list of the courses that the user has entered. however, i want to be able to print out a list of courses with respect to the year.
So the program would ask the user to enter a year(say 3) and the this would print out all the courses for year 3, which is defined by the 5 character in the string eg PHYS 30567 Programming in C++(The Full course title entered by user). Here the 5th character is a 3 (this is the character defining the year of the course) and so i want the program to print out all the courses countained within the vector string with a 5th charcter of 3 to give me all the year 3 courses.
Does anyone have any guidance or advice they coudl give to help me