Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Emagen

CALLBACK and Namespace explanation

This topic is 6482 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 - Can someone please explain to me what CALLBACK is and how namespace works? I am totally confused from the tutorials. Thanks All

Share this post


Link to post
Share on other sites
Advertisement
Hi -

Nevermind on the CALLBACK question, I just noticed the message posted earlier, so can someone please just explain namespace to me please.

Thanks All

Share this post


Link to post
Share on other sites
namespaces are used to prevent name collisions(two class that have the same name)
if you include a file that has a class called "A" and
you wrote a class called "A",normally you would have to change
the name of one of the classes.

But if you put your class inside a namespace you wont have to change the name.
namespace Name
{
class A
{
}
}
To use your A class you have to put the namespace in front of
the type name i.e. Name::A newObj;

They''re best for large progs that use lots of third-pary libraries.

Share this post


Link to post
Share on other sites

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