* kid_kei:
Say there are two classes: System_Controller_Class and UDP_Input_Class.
If I were to declare an instance of class UDP_Input_Class in
System_Controller_Class like so:
extern UDP_Input_Class UDP_Input;
what would be the significance?
Depends on where that declaration occurs.
For a member variable a conforming compiler must reject the code: you
don't use "extern" for member variables.
For a variable declared locally in a member function, it would be a
declaration of an "extern" variable at namespace scope, i.e. a global
variable -- defined somewhere else (most probably in another
translation unit).
why not just declare an instance of the class without the extern?
Only you can answer why you would add "extern".
What does adding the extern buy you in terms of scope?
See above.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?