Re: [Dev-C++] what is a resource? how do I create my own headers?
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: <ste...@ge...> - 2001-01-05 15:09:55
|
Ah, what is implementation stuff?? Can someone give an example? :-) Thanks. ----- Original Message -----=20 From: "Ioannis Vranos" <no...@ya...> To: <dev...@li...> Sent: Thursday, January 04, 2001 7:07 AM Subject: RE: [Dev-C++] what is a resource? how do I create my own = headers? > He can use the following notation so as to bbe protected from multiple > includes. >=20 > #ifndef PINKY&THE_BRAIN >=20 > #define PINKY&THE_BRAIN > // implementation stuff > #endif >=20 >=20 > Ioannis >=20 > > -----Original Message----- > > From: dev...@li... > > [mailto:dev...@li...]On Behalf Of Luc = Morin > > Sent: Thursday, January 04, 2001 4:59 AM > > To: dev...@li... > > Subject: Re: [Dev-C++] what is a resource? how do I create my own = headers? > > > > > > > > ----- Original Message ----- > > From: "Ramana Kumar" <ra...@my...> > > To: <dev...@li...> > > Sent: Wednesday, January 03, 2001 9:16 PM > > Subject: RE: [Dev-C++] what is a resource? how do I create my own = headers? > > > > > > > > > > As far as I know, this is how you use header files, this is how > > I use them > > > but sometimes I don't see the point if you know the function will = not be > > > used later. If this is the case, keep the whole function in one > > file (a .h > > > file if it happens to be) and then you can include this as a > > file full of > > > functions in a project (used in a .cpp file like main.cpp). > > > > > > Ramana Kumar > > > ICQ# 93667117 > > > To get paid for surfing the 'net please visit > > > https://www.alladvantage.com/joinsecure.asp?refid=3Djpn471 > > > > > > > It is not a very good idea to put definitions in a header file. Next = thing > > you know, > > you include the file from another translation unit and you get = multiple > > definitions > > problems. > > > > I'd advise that if the function is gonna be used only in one = translation > > unit to put > > the function in that very same translation unit (declaration AND > > definition). > > > > Just my $0.02 > > > > Luc Morin > > > > > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users > > >=20 >=20 > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > http://lists.sourceforge.net/mailman/listinfo/dev-cpp-users |