Scope --C ++ 11 (d)

  • 1, the local scope:

Statement name in a local variable called lambda functions or, using the concept of "block" is defined boundaries, i.e., braces {} to be defined.

  • 2, class scope:

If the name of the class is defined, and the function is located, lambda or outside enum class, called the class member name.

  • 3, namespace scopes:

If a name defined in the name space, and located class, function, lambda or outside enum class, called namespace member name.

  • 4, global name space:

In addition to declare the names of all the structures referred to as global names.

Guess you like

Origin www.cnblogs.com/share-ideas/p/11880001.html