-
Notifications
You must be signed in to change notification settings - Fork 0
/
func.h
52 lines (38 loc) · 1.13 KB
/
func.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
40
41
42
43
44
45
46
47
48
49
50
51
52
#ifndef FUNC_H
#define FUNC_H
#include <QtCore/QString>
#include <vector>
#include <string>
#include <fstream>
using namespace std;
int strToInt(string numStr); // Should be a pure-digits decmal number;
double strToDouble(string numStr); // Should be a pure-digits decimal .
class User
{
private:
unsigned int number;
string name;
double money;
public:
User(unsigned int newNumber, string newName, double newMoney);
User(int newNumber, string newName, double newMoney);
User(string newNumber, string newName, string newMoney);
int consume(float consumeMoney);
int charge(float chargeMoney);
int changeName(string newName);
unsigned int getNum();
string getName();
const char* getC_strName();
double getMoney();
};
extern vector<User*> userPtrVec;
extern string applicationDirPathStr;
extern string userDataPathStr;
int readData(string filePath);
int readData();
int writeData(string filePath);
int writeData();
int addUser(unsigned int newNum, string newName, double newMoney);
int addUser(int newNum, string newName, double newMoney);
int deleteUser(unsigned int userNum);
#endif