Tuesday, June 21, 2011

How to create User-defined header File

juz open turbo c and type is following code

#include <stdio.h>
#include <conio.h>
void get()
{
  printf("Hi this is from header\n");
}
void put()
{
printf("bye");
}


// once you write this file save it as myheader.h in ur turbo c editor


***************************************************************
Now you open a new file in turbo c and then start writing is code given below:

#include "myheader.h"

void main()
{
   get();
   put();
}

save this file as sample.c and see it works ///
 

1 comment:

  1. great work but this good too:
    http://kodingexamples.blogspot.com/2014/04/how-to-create-header-files-in-cc.html

    ReplyDelete