c++ - invalid simple type name destructor
- Wichetael (3/3) Mar 11 2004 Could anybody tell me what this error means exactly? I can't find it in ...
- Wichetael (9/12) Mar 11 2004 Ah, I found the error, apparently I left an empty set of parenthesis, wh...
- Heinz Saathoff (15/18) Mar 12 2004 if you have
- Wichetael (7/24) Mar 16 2004 Of course, doh...
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
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 inthedocumentation on the site. Regards, Remko van der Vossen.
Mar 11 2004
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
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...whereAh, I found the error, apparently I left an empty set of parenthesis,havethere had been a variable initialization. But is it really false C++ toan 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