18 lines
300 B
C++
18 lines
300 B
C++
|
#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]};
|
||
|
}
|
||
|
|
||
|
}
|