I gave you the correct term to Google. Here are the first two paragraphs from the first hit for
C++ scope:
Quote:
C++ names can be used only in certain regions of a program. This area is called the "scope" of the name. Scope determines the "lifetime" of a name that does not denote an object of static extent. Scope also determines the visibility of a name, when class constructors and destructors are called, and when variables local to the scope are initialized. (For more information, see Constructors and Destructors.) There are five kinds of scope:
*
Local scope A name declared within a block is accessible only within that block and blocks enclosed by it, and only after the point of declaration. The names of formal arguments to a function in the scope of the outermost block of the function have local scope, as if they had been declared inside the block enclosing the function body. Consider the following code fragment:
|
This tells you that
nod is only valid inside the function where it is defined.
Search is the first part. The second is the ability to read and comprehend. The are
requirements for a good programmer because the time economy is important.