game programming question
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 ;]
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 ;]
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?
Are you having trouble creating the sourcefiles themselves in the ide & adding them to the project?
in between [#source][#/source] without the # (that's the general tags)
other useful stuff is in the forum faq
regards
/thallish
other useful stuff is in the forum faq
regards
/thallish
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement