Jump to content
  • Advertisement
Sign in to follow this  

Help on #includes in C++

This topic is 4833 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
Sign in to follow this  

  • Advertisement

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!