Menu Driven Program - Need help finishing

Hey guys, I can't wrap my head around these 5 functions and statement to call the function. I've written comments on the areas I cant figure out and what the functions need to do.

The program is a menu driven program that keeps track of a list of student's names using vector.

Any help appreciated. I am very new to C++.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95

#include <iostream> 
#include <vector>
#include <fstream>
#include <string>

using namespace std; 
 
//function prototypes 
int read_file(string, vector<string>&); 
void display_all(vector<string>); 
void add_name(vector<string>&); 
void delete_name(vector<string>&); 
void quit_program(string, vector<string>&); 
 
int main() 
{ 
	 char cInput; 
	 string strFileName; 
	 vector<string> vecStudent; 
 
	 cout<<"Please enter the data file name (with location): "; 
	 cin >> strFileName; 
 
	//Need to write a statement that calls a function to read the content of the 
	//input file into the vector vecStudent 
 
	 while (true) 
	 { 
		 cout<<"----------------------------------------"<<endl; 
		 cout<<" Student Record - Main Menu "<<endl; 
		 cout<<"----------------------------------------"<<endl; 
		 cout<<" Enter 1 to display ALL students"<<endl; 
		 cout<<" Enter 2 to add a student name"<<endl; 
		 cout<<" Enter 3 to delete a student name"<<endl; 
		 cout<<" Enter 4 to SAVE and quit the program"<<endl; 
		 cout<<"----------------------------------------"<<endl; 
		 cout<<"Enter menu option: "; 
		 cin>>cInput; 
		 switch (cInput) 
		 { 
			 case '1': 
				 display_all(vecStudent); 
				 break; 
			 case '2': 
				 add_name(vecStudent); 
				 break; 
			 case '3': 
				 delete_name(vecStudent); 
				 break; 
			 case '4': 
				 quit_program(strFileName, vecStudent); 
				 return 0; 
			 default: 
				 cout<<"invalid input"<<endl; 
				 break; 
		 } 
	 } 
	 return 0; 
} 
 
 
 
//Still need to define functions

int read_file(string strFileName, vector<string>&vecThisStudent) 
{ 
 //This function read the content of the file into the vector. If there 
 //is an error, an error code should be returned. 
} 
 

void display_all(vector<string> vecThisStudent) 
{ 

} 

void add_name(vector<string>&vecThisStudent) 
{ 

} 

void delete_name(vector<string>&vecThisStudent) 
{ 

} 

void quit_program(string strFileName, vector<string>&vecThisStudent) 
{ 
 
 //This is the function that should write the vector’s content back to the file. 
 
 cout<<"Thanks for using the program. Program terminated"<<endl; 
} 
anyone have any ideas?
Topic archived. No new replies allowed.