-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
39 lines (29 loc) · 881 Bytes
/
Copy pathmain.cpp
File metadata and controls
39 lines (29 loc) · 881 Bytes
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 "include/Notes.hpp"
#include <windows.h>
#include <conio.h>
int main(int argc, char* argv[]){
SetConsoleOutputCP(CP_UTF8);
if(argc >1){
Notes file(argv[1]);
std::cout << "File: " << argv[1] << std::endl;
while(true){
system("cls");
file.Print();
file.Kursor_print();
file.Print_menu();
while(_kbhit()){
//std::cout << static_cast<int>(_getch()) << std::endl;
int key = static_cast<int>(_getch());
if(key == 224 ){
file.Kursor_move(static_cast<int>(_getch()));
}
else{
file.Operation(key);
}
}
Sleep(300);
}
}
return 0;
}