www.digitalmars.com         C & C++   DMDScript  

c++ - invalid simple type name destructor

reply "Wichetael" <wichetael gmx.net> writes:
Could anybody tell me what this error means exactly? I can't find it in the
documentation on the site.

Regards, Remko van der Vossen.
Mar 11 2004
parent reply "Wichetael" <wichetael gmx.net> writes:
Ah, I found the error, apparently I left an empty set of parenthesis, where
there had been a variable initialization. But is it really false C++ to have
an empty set of parenthesis in a variable declaration?

Also, I still don't get what the error is trying to tell me, and why is it
not included in the on-line documentation?

Regards, Remko van der Vossen

"Wichetael" <wichetael gmx.net> wrote in message
news:c2q22g$2tnt$1 digitaldaemon.com...
 Could anybody tell me what this error means exactly? I can't find it in
the
 documentation on the site.

 Regards, Remko van der Vossen.
Mar 11 2004
parent reply Heinz Saathoff <hsaat bre.ipnet.de> writes:
Hello,

Wichetael wrote...
 Ah, I found the error, apparently I left an empty set of parenthesis, where
 there had been a variable initialization. But is it really false C++ to have
 an empty set of parenthesis in a variable declaration?
if you have struct XYZ { XYZ() {} ~XYZ() {} }; and write a variable definition as XYZ variable(); // parenthesis here! then the compiler will not interpret this as a variable definition but as a function declaration (variable is a function taking no arguments and returning a XYZ). To define a variable the parenthesis must be taken away. - Heinz
Mar 12 2004
parent "Wichetael" <wichetael gmx.net> writes:
Of course, doh...

Thanks anyway,

Remko van der Vossen.

"Heinz Saathoff" <hsaat bre.ipnet.de> wrote in message
news:MPG.1abbc008a9fc1a5f9896da news.digitalmars.com...
 Hello,

 Wichetael wrote...
 Ah, I found the error, apparently I left an empty set of parenthesis,
where
 there had been a variable initialization. But is it really false C++ to
have
 an empty set of parenthesis in a variable declaration?
if you have struct XYZ { XYZ() {} ~XYZ() {} }; and write a variable definition as XYZ variable(); // parenthesis here! then the compiler will not interpret this as a variable definition but as a function declaration (variable is a function taking no arguments and returning a XYZ). To define a variable the parenthesis must be taken away. - Heinz
Mar 16 2004