Ok, so I was reading this book called 'A Tour of C++' by Bjarne Stroustrup and it had the class and namespace scopes defined as follows:
Class scope: A name is called a member name (or a class member name) if it is defined in a class, outside any function or enum class. Its scope extends from the opening { of its enclosing declaration to the end of that declaration.
Namespace scope: A name is called a namespace member name if it is defined in a namespace outside any function, , class, or enum class. Its scope extends from the point of declaration to the end of its namespace.
Quite frankly, I was unable to comprehend the difference. If someone could be kind enough to explain this in simpler terms or more detail for a beginner, it would be really appreciated.
And what exactly does 'namespace' mean? Is class scope as of a member variable of a class and namespace scope as of a global variable outside any class? Is my interpretation correct?