Saturday 2 March 2013

How to create header file in c++

Hi!guys
Today i want to talk how you guys create c++ header file .........
So here we go.........................................................................................................

  1. First off open node or any editor
     
            void show()
{
int a,b,c;
cout<<"Enter 1st number\t";cin>>a;
cout<<"Enter 2nd number\t";cin>>b;
c=a+b;
cout<<"Sum\t"<<c<<endl;

}
2.    2nd  save as file ......like new.h
3.    Place this file on the  C:\BC5\INCLUDE or any where
4.   Open the borland c++ and write program there


                    #include <iostream>
                    #include <conio>
                    #include <new.h>

main()

{

   show();
getch();
                             



}

Thanks guys.......................................................................

0 comments:

Post a Comment