Afficher un message
Vieux 05/06/2008, 17h55   #5
Victor Bazarov
Aucun Avatar
 
Messages: n/a
Hébergeur:
Par défaut Re: try catch g++ syntax problem

Frank Birbacher wrote:
> Hi!
>
> Victor Bazarov schrieb:
>>> catch(Exception e)
>>> {

> [snip]
>> You probably meant to use 'exception' and not 'Exception'. C++ is
>> case sensitive. Of course, the compiler should be a bit more verbose
>> and tell you that 'Exception' symbol is undefined, not "a syntax
>> error"...

>
> But for std::exception you need a reference, don't you?
>
> catch(std::exception const& e)
> {
>
> std::exception is abstract AFAIK.


If it were, the compiler would have told him that, don't you think? No,
'std::exception' isn't abstract.

V
--
Please remove capital 'A's when replying by e-mail
I do not respond to top-posted replies, please don't ask
  Réponse avec citation
 
Page generated in 0,04530 seconds with 9 queries