Re: code in header file?
From: Pedro Graca (hexkid+usenet_at_gmail.com)
Date: 11/09/04
- Next message: B. v Ingen Schenau: "Re: Dynamic arrays"
- Previous message: Siva Palaninathan: "Code segment"
- In reply to: Marko Zagar: "Re: code in header file?"
- Next in thread: Alwyn: "Re: code in header file?"
- Reply: Alwyn: "Re: code in header file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 9 Nov 2004 16:17:04 GMT
Marko Zagar wrote:
> Pedro Graca wrote:
>
>> My questions are:
>>
>> is it ok to add code in the header file?
>> is it better to change that definition to a declaration and write the
>> definition in the corresponding .cpp file (maybe with the inline keyword)?
>> What are the [dis]advantages of having code in the header file?
>
> Aside from longer compile and link times (if you include that header in
> other cpp files, the same code will be compiled again), I see no problem.
>
> If you change the location of code there should be no problems, except
> maybe any automization thinggies by M$ that might not be able to find
> it, but I think that's unlikely.
Thank you Marko.
I feel better having the code in the .cpp file (probably inline'd).
I'll try to remember to make the relevant changes and not accept
Microsoft defaults.
-- USENET would be a better place if everybody read: | to mail me: simply | http://www.catb.org/~esr/faqs/smart-questions.html | "reply" to this post, | http://www.netmeister.org/news/learn2quote2.html | *NO* MIME, plain text | http://www.expita.com/nomime.html | and *NO* attachments. |
- Next message: B. v Ingen Schenau: "Re: Dynamic arrays"
- Previous message: Siva Palaninathan: "Code segment"
- In reply to: Marko Zagar: "Re: code in header file?"
- Next in thread: Alwyn: "Re: code in header file?"
- Reply: Alwyn: "Re: code in header file?"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|