Hello, I am reading a C++ book, and am in the section of handling exceptions. I am wondering why the exception handler, when handling strings, must use a pointer to a char? For example, look at the parameter list of the catch statement:
1 2 3 4 5 6 7 8 9 10 11 12
try
{
quotient = divide(num1, num2);
cout << "The quotient is " << quotient << endl;
}
catch (char *exceptionString)
{
cout << exceptionString;
}
I received an error when I used: catch (char exceptionString)
Why?