22 lines
474 B
C++
22 lines
474 B
C++
#include <iostream>
|
|
#include <parser.h>
|
|
|
|
int main(const int argc, const char** argv)
|
|
{
|
|
try
|
|
{
|
|
const auto value = mixplus::Parser::parseAndAdd(argc, argv);
|
|
|
|
const auto result = mixplus::Parser::formatResult(value);
|
|
|
|
std::cout << result.hexadecimal << ' ' << result.digit << std::endl;
|
|
}
|
|
catch (std::invalid_argument& e)
|
|
{
|
|
std::cout << e.what() << std::endl;
|
|
std::cout << "ERROR" << std::endl;
|
|
}
|
|
|
|
return 0;
|
|
}
|