Search This Blog

Pages

Thursday, February 25, 2010

Make header files in c

You can easily make a header file in c by following these steps:

1)open turbo c

2)Go to File->New

3)write all the header files & functions(except main) which you want in ur header files in the program.

4)Save it in Directory\tc\include\filename.h

5)filename is your desired header file name.Remember to save with filename.h extension.

6)Now open any new program

7)Include the header file u just made.

Example:

my.h:

#include

void fun()

{

printf("Hello");

}

in my case saving as--c:\tc\include\my.h

Check.c:

#include

void main()

{

fun();

}

No comments:

Post a Comment