-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.cc
46 lines (30 loc) · 1.15 KB
/
main.cc
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
// Time-stamp: <2016-01-28 15:03:51 dmendyke>
// Author: Daniel Mendyke [[email protected]]
//
// main.cc: Defines main routine of this sample application
//
// Required header files
//-----------------------------------------------------------------------------
#include <cstdlib> // EXIT_SUCCESS
#include <iostream> // std::cerr
#include <exception> // std::exception
#include "application.hh" // sample::application
// NS short hand
//-----------------------------------------------------------------------------
using namespace std; // standard library
using namespace sample; // Project NS
// Standard entry into the application
// argc - int: Number of command line parameters
// argv - char*: List of the command line parameters
//-----------------------------------------------------------------------------
int main( int /*argc*/, char* /*argv*/[] ) {
int result = EXIT_SUCCESS; // default is error free
try { // last chance error handling
application app;
result = app.run();
} catch( exception& error ) {
cerr << error.what() << endl;
result = EXIT_FAILURE;
}; // end try / catch
return result;
}; // end main