Hi, I was wondering how to reference non static variables from
within a static function. Do you have to recast them as static
within the function? I'm completely new at static programming,
so if anyone has any good tutorials it would be much
appreciated. The reason originates at what happens when a class
is instantiated. When a class is instantiated, memory is
allocated for the non-static data members. That means when a
class is not instantiated, no memory is allocated for the non-
static data members and hence they cannot be accessed. A non-
static method can access non-static data members. So non-static
methods can only be called after a class is instantiated. Now
static methods can be called without instantiating the class. So
if a static method calls a non-static method which in turn
accesses non-static data members and the class is not
instantiated, you're trying to access invalid memory.
«_Superman_» I love work. It gives me something to do between
weekends. You'll have to pass a pointer to the particular