B
bob
Stroustrup 3rd edition, 4.9.4, 2nd paragraph:
"A name is called global if it is declared outside any function, class
(Chapter 10), or namespace. The scope of a global name extends from the
point of declaration to the end of the file in which its declaration
occurs."
Is x in the following global?
// Start of a file
static const int x = 0;
class MyClass
{
//etc.
I know such usage is deprecated (ref: B.2.3 in the above).
"A name is called global if it is declared outside any function, class
(Chapter 10), or namespace. The scope of a global name extends from the
point of declaration to the end of the file in which its declaration
occurs."
Is x in the following global?
// Start of a file
static const int x = 0;
class MyClass
{
//etc.
I know such usage is deprecated (ref: B.2.3 in the above).