Re: Headers!
From: Greg Comeau (comeau_at_panix.com)
Date: 03/05/04
- Next message: Arthur J. O'Dwyer: "Re: string question"
- Previous message: Leor Zolman: "Re: string question"
- In reply to: Atmapuri: "Headers!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 5 Mar 2004 10:36:34 -0500
In article <jyZ1c.5885$%x4.732731@news.siol.net>,
Atmapuri <janez.makovsek@usa.net> wrote:
>I looked through the web and different C tutorials, but could not find
>anywhere an explanation of what are .h files and how to write them.
>Everybody explaines how to use them, but there are no references to
>why and how... Could anybody help at least with a link?
Other hand no doubt responded to this already, so I'll add
that you should consider getting a copy of Stroustrup's
3rd edition (or special edition) and check out Chapter 9.
>Another thing:
>
>Why this:
>
>#ifdef __cplusplus
>extern "C"
>{
>#endif
Because that author appears to be intending to support co-ed header
files, that is, header files that can be accepted by both C and C++.
>And is there any point in giving my file a .c extension or should I just
>make it .cpp. I will not use objects.
Depends upon your compiler.
-- Greg Comeau / Comeau C++ 4.3.3, for C++03 core language support Comeau C/C++ ONLINE ==> http://www.comeaucomputing.com/tryitout World Class Compilers: Breathtaking C++, Amazing C99, Fabulous C90. Comeau C/C++ with Dinkumware's Libraries... Have you tried it?
- Next message: Arthur J. O'Dwyer: "Re: string question"
- Previous message: Leor Zolman: "Re: string question"
- In reply to: Atmapuri: "Headers!"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|