1) For convenience, I have my entire program in a try block. That way, I can make an exception at any time in my code and know that it will be processed the same way. As the program gets larger, will this method cause a performance hit?
2) If the objects are not selected when leaving the scope, then why throw a temporary object into action? eg:.
class Error: public std :: exception
{
private:
char * m;
private:
Error (char * l): m (l) {}
virtual char * what ()
{
return m;
}
};
int main ()
{
try
{
throw Error ("test");
}
catch (std :: exception & e)
{
puts (e.what ());
return -1;
}
return 0;
}throw, , try?
3) Windows, , what() STL char*? wchar_t*?