Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Static vs. Non-Static 1

Status
Not open for further replies.

k4ghg

Technical User
Dec 25, 2001
192
US
Hi - I am trying to understand the concept of static vs non static and how to call variables between classes. I am trying to access a non static variable into a static class (not certain why one is static and the other not) and I get an error.

Is there a simple static vs non static explanation? Thanks... Ronnie
 
Static variables belong to the class and not any one object created from the class. You should be able to access the static members of a class by using the class name. Post some code and people will be able to help more.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top