header-files

what is the usefulness of creating our own header file

Possible Duplicate: What are the point of header files in C? what is the usefulness in creating our own header file while doing a project?? ...

Avoid adding "include paths" for headers that are not directly #included

Suppose I have two vc++ project, proj_a and proj_b proj_a contains a header file a.h proj_b has dependency on proj_a. It contains file b.h that does #include <a.h>. I add a.h's directory in the "additional include directories" in its project settings to build it. Now say, I have 100 more projects, whose files #include <b.h>. Only addi...

Change header file extension in CodeBlocks

I searched the web and other groups as well as CodeBlocks. When I create a new class, or when it creates a new header file, I would like it to use ".hpp" for C++ header files. How do I tell it to do this? ...

Difference between @interface definition in .h and .m file

Hi friends... Normally we use @interface interface_name : parent_class <delegates> { ...... } @end method in .h file and in .m file we synthesis the properties of variables declared in .h file. But in some code, this @interface.....@end method is kept in the .m file also. What it means? What is the difference between them? Also g...

Compiling with header files

Compiling the file main.c with: gcc main1.c -o final gives me: /tmp/cc1cwhAP.o: In function `main': main1.c:(.text+0xb): undefined reference to `hi' main1.c:(.text+0x15): undefined reference to `hi' collect2: ld returned 1 exit status main1.c: #include <stdio.h> #include "incl.h" int main(void) { hi = 1; printf("hi = %d",hi); ...

When should a .c file not have an associated .h file?

Most of the time in C programming it seems that there will be one header file (.h) per code file (.c), for the function prototypes at least. When would it be appropriate to not have a header file for a code file? ...