Re: C directives



Jonathan Bartlett wrote:

> Perhaps the point is that you can have a file which handles all of your
> defines, just by including the right files and doing
>
> #define __KERNEL_DEF
>
> and including the right files. This way when someone adds a variable
> definition, they only have to add it into a single header file, rather
> than also having to add it to a regular source file.

But then you'd have to make sure to only include the header file in one
particular source file, so you could just as well define the variables
there.


Christian
.



Relevant Pages

  • to get macro name from macro value
    ... How could we get a macro name from a macro value ... in a header file ... Prev by Date: ...
    (comp.lang.c)
  • Re: to get macro name from macro value
    ... > in a header file ... Marc Boyer ... Prev by Date: ...
    (comp.lang.c)
  • Re: linking problem
    ... >> Note the crucial difference between template code and ordinary code. ... > definition for GetInput in the driver file. ... is effectively the same as putting all the template code in the header file, ... it makes sense to put template code in a source file (which is clearly ...
    (comp.lang.cpp)
  • Re: Programming and Style Guidelines for C
    ... > should have function prototypes available in a header file." ... That header file must be included in the source file defining ... dynamic memory allocation is not ...
    (comp.lang.c)
  • Re: multiple file programs
    ... A header file acts as though the literal text within the file had been typed ... into your source file. ... that comes with your compiler. ... Libraries are used to minimize compile time and to reduce ...
    (alt.comp.lang.learn.c-cpp)