aocpp/lib/src/Startup.cpp

18 lines
300 B
C++
Raw Normal View History

#include <aocpp/Startup.hpp>
#include <cstdlib>
#include <iostream>
#include <fstream>
namespace aocpp {
auto Startup(int argc, char ** argv) -> std::ifstream {
if (argc != 2) {
std::cerr << "Expected input file argument\n";
exit(EXIT_FAILURE);
}
return std::ifstream{argv[1]};
}
}