unhandled exception

I don't understand because it doesn't manage this exception ..

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#include <iostream>
using namespace std;

int main()
{
     try
     {
	      throw "Error";
     }  
     catch (char* message)
     {
          cerr << message << endl;    
     } 

 system("pause");   
}
Line 10, specify const to match the type of the object being thrown:
 
catch (const char* message)
aaaah...lol i forgot always it xD
Topic archived. No new replies allowed.