COMP2113
COMP2113_ENGG1340 Programming technologies and Computer programming II [Section 2BC] [2023]
Loading...
Searching...
No Matches
user_commands.cpp File Reference
#include <iostream>
#include <string>
Include dependency graph for user_commands.cpp:

Go to the source code of this file.

Classes

struct  Course
 
struct  Courselist
 

Functions

int main ()
 

Variables

const int MAX = 100
 

Function Documentation

◆ main()

int main ( void )

Definition at line 34 of file user_commands.cpp.

34 {
35 string input;
36 cin >> input;
37 Courselist course_list;
38 while (input != "exit") {
39 if (input == "add") {
40 // handle add commnad
41 string data[3];
42 cin >> data[0] >> data[1] >> data[2];
43 course_list.add(data[0], data[1], data[2]);
44 }
45 if (input == "show") {
46 // handle show commnad
47 string data[1];
48 cin >> data[0];
49 course_list.show(data[0]);
50 }
51 cin >> input;
52 }
53 return 0;
54}
int add(string code, string name, string lecturer)
void show(string code)

References Courselist::add(), and Courselist::show().

Here is the call graph for this function:

Variable Documentation

◆ MAX

const int MAX = 100

Definition at line 7 of file user_commands.cpp.

Referenced by Courselist::add().