CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2011
    Posts
    32

    Static variables among classes

    How are those static variables'values altered for each instance's access and change ?

  2. #2
    Join Date
    Nov 2000
    Location
    Voronezh, Russia
    Posts
    6,620

    Re: Static variables among classes

    They are not altered for each instance and equally accessible by any instance. A class static variable exists as a single variable shared among all the class instances. Been changed by one instance, it immediately shows the change in every other instance.
    Best regards,
    Igor

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured