Question: what is the difference between class and namespace?
Answer: Classes are data types. They are an expanded concept of structures, they can contain data members, but they can also contain functions as members whereas a namespace is simply an abstract way of grouping items together. ... Using a class implies that you can create an instance of that class, not true with namespaces. 2.