This will be my 1st question here. I have came across an issue that I would like to resolve in a program that I'm working on (doing some intern/developer shadowing tasks).
I have a std::map data structure. Every time I pass from the cmd line a value that is not mapped I get the: terminate called after throwing an instance of 'std::out_of_range' what(): map::at Aborted (core dumped)
And it is fine, this is the way it should be. However what I would like to achieve is to validate the user input and if the value is not present in the map then for example capture the above event in a variable and then print it out.
Every conditional statement that I try is not working as I would like to as it instantly throws out that "terminate called..." ad closes down the whole program.