-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcalendar.h
58 lines (34 loc) · 1.19 KB
/
calendar.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
53
54
55
56
57
58
#ifndef CALENDAR_H
#define CALENDAR_H
#include <iostream>
using namespace std;
class Calendar {
private:
protected:
int days_number_in_month[12];
string month[12];
int today;
int this_month; /* شماره این ماه */
int this_year; /* شماره این سال */
int day_number_in_weekday; // 1,2,3,4,5,6,7 شماره هر روز هفته
int first_day_month_in_weekday; // اولین روز ماه در چه روزی از هفته است
int array[42]; //[6][7] .... for draw calendar
int number_note=0;
string fileName = "note.txt";
string note_name = to_string(this_year) + "-" + to_string(this_month) + "-" + to_string(today);
string hashh = "$#@sudo:" + note_name;
string end_hashh = hashh + "end";
string delete_hashh = hashh + "dalete";
void create_days_array();
void changeColor(int desiredColor);
void writeFile(fstream &myFile, int count);
void readFile(fstream &myFile, int count);
int numberFileExist(fstream &myFile, string date);
void deleteFile(fstream &myFile, int count);
public:
void printCalendar();
void nextDay();
void previousDay();
void write();
};
#endif // CALENDAR_H