Search the web
Sign In
New User? Sign Up
c-prog · C/C++ Programmer's Mailing List
? Already a member? Sign in to Yahoo!

Yahoo! Groups Tips

Did you know...
Hear how Yahoo! Groups has changed the lives of others. Take me there.

Best of Y! Groups

   Check them out and nominate your group.
Having problems with message search? Fill out this form to ensure your group is one of the first to be migrated to the new message search system.

Messages

  Messages Help
Advanced
Header file   Message List  
Reply | Forward Message #68780 of 71513 |
Re: [c-prog] Header file

The real question is what to put in "something.c" and what
to put in the corresponding "something.h".

Personally I regard the header file "something.h" as a
public interface to the code in "something.c". Therefore it
contains function prototypes for public (non-static)
functions, as well as constants and external variables,
anything that a user needs to know, together with comments
saying what they're for and how to use them.

Anything the user doesn't need to know goes into
"something.c". In my case this usually consists mainly of
function definitions.

This is my attempt to draw a line between public and
private, i.e. encapsulation.

David




Fri Nov 21, 2008 4:01 pm

dc_hamill
Offline Offline
Send Email Send Email

Forward
Message #68780 of 71513 |
Expand Messages Author Sort by Date

Hi everybody,                     I want to create my own header file in c/c++. How can i?                       ...
sudhakar bonthu
bonthu.sudhakar
Offline Send Email
Nov 21, 2008
9:37 am

On Fri, Nov 21, 2008 at 10:37 AM, sudhakar bonthu ... Exactly the same way you create your c or cpp files, you create a new file in your text editor and save...
Tamas Marki
tamas_m
Offline Send Email
Nov 21, 2008
10:51 am

... But don't expect functions to magically appear or exist just because you write a prototype into a header file. You will have to write those functions too....
Thomas Hruska
shininglightpro
Offline Send Email
Nov 21, 2008
1:42 pm

This is very simply of creating your own header file well let me tell you one thing... Please i hope you know how to create functions yes this is the same way...
Prince Annan Koomson
pk_annan
Offline Send Email
Nov 21, 2008
2:09 pm

The real question is what to put in "something.c" and what to put in the corresponding "something.h". Personally I regard the header file "something.h" as a ...
David Hamill
dc_hamill
Offline Send Email
Nov 21, 2008
4:01 pm
Advanced

Copyright © 2009 Yahoo! Inc. All rights reserved.
Privacy Policy - Terms of Service - Guidelines - Help