Jump to content
  • Advertisement
Sign in to follow this  
wiseduck

Help on #includes in C++

This topic is 4748 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

Hi there people! I just started learning C++ (already program in JAVA for 2 years) and I am having hard time figuring out the best way to employ #include's in my codes. It appears everyone puts Class definitions and functions prototypes in header files. That's ok! But when I am about to link, for eg., foo.h and foo.cc to goo.h and goo.cc, Should I include foo.h or foo.cc? And in which goo file (goo.h or goo.cc)? Also I want to know if there are any possible problems of #include'ing the same library many times in a project. For eg., <iostream> in foo.h and the same <iostream> in goo.h.

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • 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!