CMMTree v1.0
main_01.hpp
Go to the documentation of this file.
1#ifndef _main_01_hpp_
2#define _main_01_hpp_
3//---------------------------------------------
4#include <stdio.h>
5#ifdef _WIN64
6 #include <windows.h>
7#else
8 // ...
9#endif
10
11
12// uncomment to disable assert()
13// #define NDEBUG
14#include <cassert>
15#define assertM(exp, msg) assert(exp && msg)
16
17
21#define NODE_COUNTER
22
25#ifdef NODE_COUNTER
26 #define MAX_CMMTree_NODES 1'100'000'001
27 //#define MAX_CMMTree_NODES 10000
28
29 #define MAX_NODES_TO_PRINT 35
30 // #define PRINT_ALL_PATHS // Don't try to display all paths if the tree has a billion nodes ;).
31#endif
32
33#include "cmmtree.hpp"
34
35
36#include "../../examples/examples.hpp"
37#ifndef EXAMPLE
38 #include "./project.hpp"
39#endif
40
41
42int main_task();
43int main_task(int argc, char * argv[]);
44
45
46auto time_stamp = [](std::string msg){
47 std::time_t t_c = std::chrono::system_clock::to_time_t( std::chrono::system_clock::now() );
48 SetColor(GREEN);
49 std::cout << msg ;
50 //std::cout << std::put_time(std::localtime(&t_c), "%F %T.\n\n") << std::flush; // Linux
51 char mbstr[100];
52 if (std::strftime(mbstr, sizeof(mbstr), "%c \n\n", std::localtime(&t_c))){
53 std::cout << mbstr << std::flush;
54 }
55 SetColor(WHITE);
56};
57
58//---------------------------------------------
59#endif