forked from stephgalibert/Epitech-Nanotekspice
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.cpp
33 lines (30 loc) · 752 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
33
//
// main.cpp for nano in /home/galibe_s/rendu/cpp_nanotekspice
//
// Made by stephane galibert
// Login <[email protected]>
//
// Started on Mon Feb 8 11:52:33 2016 stephane galibert
// Last update Thu Feb 18 13:01:23 2016 stephane galibert
//
# include <iostream>
# include <string>
# include "Exception.hpp"
# include "Nanotekspice.hpp"
int main(int const ac, char const * const * const av)
{
nts::Nanotekspice *nano = NULL;
if (ac < 2)
{
std::cout << "Usage: file.nts [[input=value] [...]]" << std::endl;
return (0);
}
try {
nano = new nts::Nanotekspice(av[1], ac, av);
nano->shell();
delete (nano);
} catch (nts::NtsError const& e) {
std::cout << e.what() << std::endl;
}
return (0);
}