Jump to content
  • Advertisement

Archived

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

Jackysan

Prototype Declarations for Include Files?

This topic is 5851 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
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!