RE: [Dev-C++] Why doesn't this compile?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Ioannis V. <no...@ho...> - 2002-10-09 22:55:48
|
> -----Original Message----- > From: dev...@li...=20 > [mailto:dev...@li...] On Behalf=20 > Of Andrew Vidler > Sent: Wednesday, October 09, 2002 6:05 PM > To: 'C++ Dev' > Subject: RE: [Dev-C++] Why doesn't this compile? >=20 >=20 > Ummm...MY_TYPE can be any type, change it to "float" if you like, > doesn't make any difference like I said. > I know the constructors etc... aren't strictly needed, they don't stop > it compiling or working though. > Also, the constructors etc... *are* required for the actual > implementation - this is just a stripped down and renamed version for > test perposes. >=20 > Oh, and I disagree with the "better to 'return 0'" comment :) > 0 is an integer, I know NULL is just #defined as 0, but using NULL > implies a pointer type. > You wouldn't type the following: >=20 > UINT I =3D 27 + NULL; >=20 > Would you?, so why write: >=20 > UINT *p =3D 0; >=20 > ? "The C++ Programming Language" 3rd Edition or Special Edition (you must have this book): On page 88, 5.1.1. On page 835 the first paragraph. Ioannis * Ioannis Vranos * Programming pages: http://www.noicys.freeurl.com * Alternative URL: http://run.to/noicys |