RE: [Dev-C++] problem with static casting (C++)
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <iv...@em...> - 2003-08-14 00:16:35
|
> -----Original Message----- > From: dev...@li... > [mailto:dev...@li...] On Behalf Of Zheo > Sent: Thursday, August 14, 2003 2:15 AM > To: Lista de correo de Dev-c++ > Subject: [Dev-C++] problem with static casting (C++) > > In the line: (where ptr1 is a pointer to datatype A) > > ptr1 = (A*) std::malloc( sizeof (*ptr1) ); > > I MUST use a C-style casting, and if I try > > ptr1 = static_cast<A*> std::malloc( sizeof (*ptr1) ); ptr1 = static_cast<A*> (std::malloc( sizeof (*ptr1) ) ); Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL 1: http://run.to/noicys * Alternative URL 2: http://www.noicys.cjb.net |