changed to use start.txt as default, to be overridden by argv[1]

This commit is contained in:
Bob Polis 2020-09-09 18:29:17 +02:00
parent 79715ad9df
commit c4ade5ee09

View File

@ -30,6 +30,8 @@ void print_version() {
int main(int argc, const char * argv[]) {
try {
std::string base_url {"https://www.swiftcoder.nl/cpp1/"};
std::string next_url {"start.txt"};
int opt_char, opt_val;
struct option long_options[] = {
{"help", no_argument, nullptr, 'h'},
@ -60,15 +62,13 @@ int main(int argc, const char * argv[]) {
}
for (int i = optind; i < argc; ++i) {
try {
// process file argv[i]
next_url = argv[i];
} catch (const std::runtime_error& ex) {
std::cerr << "curly: " << ex.what() << '\n';
}
}
bool done {false};
std::string base_url {"https://www.swiftcoder.nl/cpp1/"};
std::string next_url {"gcd.txt"};
std::string code;
requester req;
interpreter proc;