I have some technical questions. In this function:
string report() const {
if(list.begin() == list.end()){
throw \"not good\";
}
//do somethi
If you throw an exception, all functions will be exited back to the point where it finds a try...catch
block with a matching catch
type. If your function isn't called from within a try block, the program will exit with an unhandled exception.
Check out https://isocpp.org/wiki/faq/exceptions for more info.
It will basically go up the stack until it finds an exception handler; if it gets to the end of the stack without finding one, your program will crash. If it does find one, it will rewind the stack up that point, run the handler, and continue with the code after the handler block, however far up your stack that may be.
You can get all sorts of details about C++'s exception handling mechanism through Google. Here's a head start.