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: Ioannis V. <no...@ya...> - 2001-01-04 15:05:52
|
He can use the following notation so as to bbe protected from multiple includes. #ifndef PINKY&THE_BRAIN #define PINKY&THE_BRAIN // implementation stuff #endif Ioannis > -----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=jpn471 > > > > 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 > |