Wednesday, April 10, 2013

How to create your own header file in Turbo C

No comments

First tell me what is header file ?

A header file is the file which contain different function for different reason.

So I am creating a file which contain the personal info of my blog,
using that header file I need not to create a all details every time, When I needed at any time, I can add that header file in header section and call that function which is defined inside that header files.


Open Text editor and create a new file by name myinfo.h And write the following code
int info()
{
 cout<<"\nName : Lovely Coding";
 cout<<"\nCoding : Get Project and Program in C and C++ ";
 return 0;

 Save it in include folder now.
And create a new file and save it on bin folder


#include "iostream.h"
#include "myhead.h"
#include "conio.h"
int main()
{
clrscr();
cout<<"\n I am calling a function which is defined in myhead.h header file";
info();
return 0;
}

0 comments:

Post a Comment

Entries RSS Comments RSS

Sample Text

Pages


Copyright © Lovely Codes
Powered by Blogger
Distributed By Free Blogger Templates | Design by N.Design Studio
Blogger Theme by Lasantha - PremiumBloggerTemplates.com