Jump to content
  • Advertisement
Sign in to follow this  
theadamSGT

game programming question

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

Advertisement
You create a new sourcefile.. you place or move code into it..

You usually share functions across sourcefiles using shared headers containing the function declarations, & share variables by including the variable declarations preceeded with the "extern" keyword in them (the headers)
Once again classes & structures are shared in the same manor - the declarations are usually placed in the headers & the definitions are written in specific sourcefiles
when the sourcecode goes through the linking stage (after each file is compiled) all of this is magically reconnected again

It was a terribly general question so I'm afraid I wasn't sure entirely how to answer ..

Somethings are best learnt by delving in & trying yourself until things eventually "click"
(they're usually the things taken for granted as simple common knowledge afterwards);
those things are usually the hardest to explain because of that ;]

Share this post


Link to post
Share on other sites
well if you explained the specific part you are having trouble understanding..?

Are you having trouble creating the sourcefiles themselves in the ide & adding them to the project?

Share this post


Link to post
Share on other sites
in between [#source][#/source] without the # (that's the general tags)

other useful stuff is in the forum faq

regards

/thallish

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!