You are here:

C++/namespace scope

Advertisement


Question
Q: What is the difference between namespace scope and class and how it is better to use namespace instead of class

Answer
Hi,
 Namespace was introduced to get rid of name clashes for class, functions, variables etc.

Anything belonging to a name space xx can be referred to as
xx:: <name>

I am not sure why you are comparing a class and a namespace.

Regards,
RaiD

C++

All Answers


Answers by Expert:


Ask Experts

Volunteer


Dharmender Rai

Expertise

I can answer general and system level C/C++ questions.

Experience

I have 5 years of experience in C++.

©2016 About.com. All rights reserved.