• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

static variable inside static function

 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
can i declare static variable inside a static function if not
why?
 
Tony Alicea
Desperado
Sheriff
Posts: 3226
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No. Methods cannot declare static variables. Any local variables defined inside the static method will be static by context.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic