Query about Header file

Please support our C advertiser: Programming Forums - DaniWeb Sister Site
Reply

Join Date: Aug 2008
Posts: 13
Reputation: rajenpandit is an unknown quantity at this point 
Solved Threads: 1
rajenpandit rajenpandit is offline Offline
Newbie Poster

Query about Header file

 
0
  #1
Feb 4th, 2009
Hello everyone, I have created my own header file but it doesn't work if i just include like "myfile.h" and it works fine if i include like "myfile.c". I just want to know that why this thing happening in Turbo C compiler even it works fine in VCpp.
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 671
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: Query about Header file

 
0
  #2
Feb 4th, 2009
Be sure to make sure all of the files are in the same project, not indervidual just indervidual files, otherwise the compiler will not know to use myfile.c.

Chris
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Join Date: Jan 2009
Posts: 476
Reputation: csurfer is just really nice csurfer is just really nice csurfer is just really nice csurfer is just really nice csurfer is just really nice 
Solved Threads: 76
csurfer's Avatar
csurfer csurfer is offline Offline
Posting Pro in Training

Re: Query about Header file

 
0
  #3
Feb 4th, 2009
All header files are taken from the include directory. May be the compiler is not responding because your newly created header file may not be in its search path.
I Surf in "C"....
Reply With Quote Quick reply to this message  
Join Date: Apr 2008
Posts: 671
Reputation: Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough Freaky_Chris is a jewel in the rough 
Solved Threads: 113
Freaky_Chris's Avatar
Freaky_Chris Freaky_Chris is offline Offline
Practically a Master Poster

Re: Query about Header file

 
0
  #4
Feb 4th, 2009
Originally Posted by csurfer View Post
All header files are taken from the include directory. May be the compiler is not responding because your newly created header file may not be in its search path.
when wraped in double quotes it is taken that the header file may be located in the same directory as the source file
Knowledge is power -- But experience is everything
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC