C and C++ Programming Resources

can we make program without header files?

Complete discussion on C/C++ and Object Oriented Behavior of C++.

can we make program without header files?

Postby napster14 » Sun Apr 11, 2010 6:46 pm

hi,
i am prateek.....i have read in a book that header files basically contains the prototypes and return types of the
pre defined functions.so if we try to define the return types of the pre defined function.
then is it possible to do it without using any header file?
plz do reply if u know any program without header files.....
napster14
 
Posts: 4
Joined: Fri Apr 09, 2010 5:56 pm

Re: can we make program without header files?

Postby dman » Wed Apr 14, 2010 12:15 am

You could do this if you choose to write everything from scratch ( you will need to write your own input / output functions in assembly language for DOS I'm not sure if you can do this for Windows , though ). I'll see if I can write an example latter.....
dman
 
Posts: 94
Joined: Mon Oct 06, 2008 6:47 pm

Re: can we make program without header files?

Postby nilkamalnayak » Tue Jul 17, 2012 10:50 am

no we cant make program without header files because for display and taking input we use stdio.h and conio.h which is really required. but if u r doing program in Turbo C 3.0 or higher version then these 2 header file is not required because it automatically adds the header files to it.
if u want to use any header file except these two u have to add library files.......
nilkamalnayak
 
Posts: 1
Joined: Tue Jul 17, 2012 10:44 am

Re: can we make program without header files?

Postby raviroy » Thu Aug 09, 2012 12:10 pm

it possible but it also depends upon compiler, means if u are using turboc2 compiler then it is possible other wise u have to use
.c after every file name. ex filename.c that there after no need to use header file in C programming. But specially want to say that use of header file is good habit some time it is required.
raviroy
 
Posts: 1
Joined: Thu Aug 09, 2012 11:39 am


Return to C/C++ Programming Language

Who is online

Users browsing this forum: Bing [Bot] and 0 guests

cron