I/O Errors Flashcards
How are inputs to a c++ deliniated?
By white space.
“./MyCode.exe in1 in2 in3” becomes {“MyCode.exe” “in1”, “in3”, “in3”}
What are the string to datatype conversion functions?
- stoi (int)
- stod (double)
- stof (float)
- stol (long)
What is a Usage Message?
A message that will print when argc == 1 (or greater than required argc) telling the user how to use the program. Stops execution after.
When returning from main, what does a value of ‘0’ signify?
Normal execution, no problems.
What library contains all the exception and error classes for c++?
“stdexcept”
Why is it important to know what a method / functions throws in C++?
Because, unlike Java, calling methods / functions are not aware of what the called method throws.
What is throwable in C++?
Everything.
In C++ try catch blocks, what is the universal catch operator?
catch(…)