-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathLib.h
39 lines (31 loc) · 1.03 KB
/
Lib.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
#include <iostream>
#include <string>
#include <sstream>
#include <ctime>
#include <iomanip>
#include <vector>
#include <fstream>
#include <Windows.h>
using namespace std;
class TelDir;
class TelEntry;
class EntryNode;
class Date
{
private:
int year, month, day, hour, min, sec;
string week;
public:
Date();
Date(const vector<string> &list);
string weekToStr(int wk) const;
friend ostream & operator<<(ostream &out, const Date *dt); //Output date to console
friend fstream & operator<<(fstream &out, const Date *dt); //Output date to file
};
bool confirm(void); //Ask user if it is confirmed.
bool checkInput(const string &input, int st, int ed); //Check that if the string is a number and between st and ed
int askModifyMethod(void);
void split(vector<string> &list, string &str); //Split string by ';'
void checkName(string &input); //Check that if the string includes ';'
int getNumber(int st, int ed); //Get a number between st and ed;
void inputLineFromCin(string &str); //Input a line of text and clear the input buffer.