Archived

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

CALLBACK and Namespace explanation

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

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