• Advertisement

Archived

This topic is now archived and is closed to further replies.

Prototype Declarations for Include Files?

This topic is 5641 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Kinda a newbie question, but if you create functions in a *.h file and include it in your source, do you need to write prototype declarations?

Share this post


Link to post
Share on other sites
Advertisement
Create your functions in a .c or .cpp files and write there prototypes in a .h file and include it in your source files. don''t create functions in a .h file... if you do so you only have to use it in only one .c or .cpp file. forget about inline functions they can be defined in a .h and included anywhere...

Share this post


Link to post
Share on other sites
Cool. Thanks a lot. I put my functions in a .cpp file and put the all the prototype declarations in "pdec.h". It seems to be working fine.

Share this post


Link to post
Share on other sites

  • Advertisement