logo       
Google Custom Search
    AddThis Social Bookmark Button

Re: static variables with function scope: msg#00033

Subject: Re: static variables with function scope
if you want a top-global clunter you could do:
it's not like you are going to have lots of inner classes, and being in
a class the whole thing is already reasonably self contained.

  class TopClass
  {
   static myclass_instances=0;
   class MyClass
   {
      int my_instance_number=myclass_instances++;
  
      ...
   }
  
   object the() { return MyClass(); }
  }
  
this still needs static, and i am not arguing against static, i just
prefer it to be simple and not made to complex.

static should help solve the problems that can't be solved otherwise

greetings, martin.




Try Searching:
servers, voip, java, networking, microsoft ...
<Prev in Thread] Current Thread [Next in Thread>