-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdatabase.h
39 lines (32 loc) · 897 Bytes
/
database.h
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
/* A database header file that stores student information
* database.h
*
* Created on: 02 Mar 2018
* Author: Tumelo
*/
#ifndef DATABASE_H_
#define DATABASE_H_
#include <string>
#include <vector>
#include <cstdlib>
/*
* A student record structure that stores student information
*/
struct student_record{
std::string name;
std::string surname;
std::string student_number;
std::string class_record;
};
extern std::vector<student_record> students;
/*
* A namespace that contains the declaration of all the database functions
*/
namespace lphtum003{
void add_student(std::string name, std::string surname, std::string student_number, std::string class_record);
void read_database(std::string filename);
void save_database(std::string filename);
void display_student(std::string student_number);
void grade_student(std::string student_number);
}
#endif /* DATABASE_H_ */