Archived

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

Emagen

CALLBACK and Namespace explanation

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