Why static functions cannot access non-static variables?
Answer:
Because a static function by definition is not tied to any single object of the class, while non-static variables always refer to an actual object in some way.
total answers (1)
start bookmarking useful questions and collections and save it into your own study-lists, login now to start creating your own collections.
Answer:
Because a static function by definition is not tied to any single object of the class, while non-static variables always refer to an actual object in some way.
need an explanation for this answer? contact us directly to get an explanation for this answer