www.digitalmars.com Home | Search | C & C++ | D | DMDScript | News Groups | index | prev | next
Archives

D Programming
D
D.gnu
digitalmars.D
digitalmars.D.bugs
digitalmars.D.dtl
digitalmars.D.dwt
digitalmars.D.announce
digitalmars.D.learn
digitalmars.D.debugger

C/C++ Programming
c++
c++.announce
c++.atl
c++.beta
c++.chat
c++.command-line
c++.dos
c++.dos.16-bits
c++.dos.32-bits
c++.idde
c++.mfc
c++.rtl
c++.stl
c++.stl.hp
c++.stl.port
c++.stl.sgi
c++.stlsoft
c++.windows
c++.windows.16-bits
c++.windows.32-bits
c++.wxwindows

digitalmars.empire
digitalmars.DMDScript

c++ - invalid simple type name destructor

↑ ↓ ← "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
↑ ↓ "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

 documentation on the site.

 Regards, Remko van der Vossen.

Mar 11 2004
↑ ↓ 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
↑ ↓ → "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,


 there had been a variable initialization. But is it really false C++ to


 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