CMMTree v1.0
main_01.cpp
Go to the documentation of this file.
2
3#include "./hpp/main_01.hpp"
4
5#ifdef MAIN_TASK
6 #ifdef NODE_COUNTER
7 template<class X>
8 inline unsigned node<X>::n_count=0;
9 #endif
10#endif
11
12int main(int argc, char * argv[]) {
13 #ifdef _WIN64
14 SetConsoleOutputCP(CP_UTF8);
15 #endif
16
17 time_stamp("\nSTART : ");
18
19 #ifdef MAIN_TASK
21 #endif
22
23 try{
24 // ...
25 #ifdef MAIN_TASK
26 // ...
27 #ifdef MAIN_ARGS
28 // ...
29 main_task(argc,argv);
30 // ...
31 #else
32 // ...
33 main_task();
34 // ...
35 #endif
36 // ...
37 #endif
38 // ...
39 }
40 catch(const std::exception& e) { SetColor(BRED); println(e.what()); SetColor(DEFAULT); }
41 catch( ... ) { SetColor(BRED); println("UNKNOWN ERROR !"); SetColor(DEFAULT);}
42
43 #ifdef MAIN_TASK
44 // ...
45 println("");
47 // ...
48 #else
49 println("Use one of the prepared examples.");
50 println("Edit the examples.hpp file and uncomment one of the selected examples.");
51 println("Compile and run the program.");
52 println("\nIn most cases, it is enough to compile the whole project like this:\n");
53 println("g++ -Wall -std=c++20 -pthread -pedantic -O3 main_01.cpp -o main_01.exe");
54 #ifdef _WIN64
55 println("You can also use the script run-selected-project.bat to run any of the prepared projects/examples.");
56 #else
57 println("You can also use the script run-selected-project.sh to run any of the prepared projects/examples.");
58 #endif
59 using namespace std::chrono_literals;
60 std::this_thread::sleep_for(2000ms);
61 #endif
62 // ...
63
64 time_stamp("\nSTOP : ");
65 return 0;
66}
The node class definition. This is a template of a class whose objects are used to build a tree of re...
Definition node.hpp:45
static void n_counter_info()
The function displays information about the total number of node<X1> objects.
Definition node.hpp:246
constexpr void println(auto const &a)
Definition utils.hpp:81