Jump to content
  • Advertisement
Sign in to follow this  
Element of Power

Multiple source files for one header in VC++?

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

Not sure if this is in the right place, but I'm writing a sprite class for SDL atm and it's turning out to have LOADS of code. It just all looks wrong inside one source file. So, I was wondering, can i split it between multiple source files, and if so, how? Will it just do all the function definitions anyway no matter what my source file is called as long as I include the header?

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by Element of Power
Not sure if this is in the right place, but I'm writing a sprite class for SDL atm and it's turning out to have LOADS of code. It just all looks wrong inside one source file. So, I was wondering, can i split it between multiple source files, and if so, how? Will it just do all the function definitions anyway no matter what my source file is called as long as I include the header?


Basically yes, having a "Something.h/cpp" pair is pure convention, it doesnt need to be that way.

Share this post


Link to post
Share on other sites
Quote:
Original post by Element of Power
Not sure if this is in the right place, but I'm writing a sprite class for SDL atm and it's turning out to have LOADS of code. It just all looks wrong inside one source file. So, I was wondering, can i split it between multiple source files, and if so, how? Will it just do all the function definitions anyway no matter what my source file is called as long as I include the header?


'LOADS' of code implies 'LOADS' of functionality.

What does a sprite do, conceptually? Now, go through the list of member functions, and justify whether they actually belong as part of a Sprite.

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.

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!