|
course.wilkes.edu/CS125Labs |
||||
Experiment 11: extern Scope
The Question: Is there anywhere in a program that a name declared as an extern cannot be accessed? Actually, we'll just discuss this one.
If you review the definition of #include <iostream>This inserts (among other things) declarations of the names cin and cout into a program.
To see this, comment out the line with the
If you remember, we always include the iostream header file prior to
the main function.
According to the scoping rule, the names declared in
To see the importance of this, uncomment the
Observation: Translate your source program. What is displayed?
Conclusions: Explain what happened in terms of
the definition of
|
Home Membership
|
|||
|
Last update: Wednesday, August 23, 2000 at 3:34:34 PM. |
||||