terminate called after throwing an instance of ‘std::out_of_range’ what(): basic_string::substr
What you experience is probably a case of an exception falling off main(), which terminates the program and gives an OS-specific error message like the one you posted. As a first measure, you can catch exceptions in main(). This will prevent your program from crashing. Now that you have this mechanism in place, you can actually hunt … Read more