New and Static Question
#4

Quote:
Originally Posted by [NaB
Hiitch - No srsly, Im a NaB ! ]
so basically, static is creating a var that you can't edit? (Confused)
Exactly, it's storage isn't allocated and deallocated on the call stack like normal variables

EDIT: Sorry, my mistake! I was confused.
Static variables are variables that are executed at compile-time, unlike the normal variables that are executed at run time.

New variables allocate the memory dynamically, Dynamic Memory Allocation definition

Static variables allocate the memory statically, Static Memory Allocation definition
Reply


Messages In This Thread
New and Static Question - by Hiitch - 13.11.2009, 21:27
Re: New and Static Question - by JonyAvati - 13.11.2009, 21:30
Re: New and Static Question - by Hiitch - 13.11.2009, 21:31
Re: New and Static Question - by JonyAvati - 13.11.2009, 21:33
Re: New and Static Question - by JonyAvati - 13.11.2009, 22:10
Re: New and Static Question - by Hiitch - 14.11.2009, 00:01
Re: New and Static Question - by Donny_k - 14.11.2009, 10:27

Forum Jump:


Users browsing this thread: 1 Guest(s)