-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.cpp
More file actions
46 lines (38 loc) · 1.07 KB
/
main.cpp
File metadata and controls
46 lines (38 loc) · 1.07 KB
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
/*
* @Author: OGAS 2970143166@qq.com
* @Date: 2025-01-02 01:17:31
* @LastEditors: OGAS 2970143166@qq.com
* @LastEditTime: 2025-01-03 01:46:12
* @FilePath: \LibraryManageSystem\main.cpp
* @Description: Coding with UTF-8
*
* Copyright (c) 2025 by OGAS, All Rights Reserved.
*/
#include "include/UI.h"
#include "include/LibrarySystem.h"
#include <Windows.h>
#include <iostream>
int main()
{
try
{
std::cout << "程序启动..." << std::endl;
SetConsoleOutputCP(CP_UTF8);
SetConsoleCP(CP_UTF8);
std::cout << "初始化系统..." << std::endl;
LibrarySystem system;
std::cout << "系统初始化完成" << std::endl;
std::cout << "创建UI..." << std::endl;
UI ui(system);
std::cout << "UI创建完成" << std::endl;
std::cout << "启动主界面..." << std::endl;
ui.start();
std::cout << "程序正常退出" << std::endl;
return 0;
}
catch (const std::exception &e)
{
std::cerr << "错误: " << e.what() << std::endl;
return 1;
}
}