class bar{
public:
static int foo;
};
func(){
int bar::foo = 10;
}
So I guess what I am asking is. Will that static vairable in the ... Well does it go in the stack or in global space? Any way does it end when the function ends?
+
Can you have static member vairables on the free store(heap)? If so how?
Thanks for any help you byonders provide. I await your answers with great aniticipation.
*Pardon my spelling errors*
Will it go away when the function ends? No. It will stick around until the program exits.