-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cpp
32 lines (27 loc) · 1009 Bytes
/
main.cpp
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
#include "mainwindow.h"
#include <QApplication>
#include <stdio.h>
#include <stdlib.h>
#include <vector>
// ERROR CHECK
void errorFatalImpl(const char *userMsg, const char *fileName,
const char *functionName, const int lineNum) {
perror(userMsg);
fprintf(stderr, "File: '%s'\nFunction: '%s'\nLine: '%d'\n", fileName,
functionName, lineNum);
exit(EXIT_FAILURE);
}
#define errorFatal(userMsg) \
errorFatalImpl((userMsg), __FILE__, __func__, __LINE__)
#define assertExpr(expr, userMsg) \
do { \
if (!(expr)) \
errorFatal(userMsg); \
} while (0)
// ErrorCheck
int main(int argc, char *argv[]) {
QApplication a(argc, argv);
MainWindow w;
w.show();
return a.exec();
}