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: Luc M. <lu...@ho...> - 2001-01-04 02:58:14
|
----- 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 |