CPB Mailing List
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: static functions
-----Original Message-----
From: Jody Hagins <gamecox@magicnet.net>
To: 'Builder Thread' <cpb-thread@zdtips.com>
Date: Friday, March 06, 1998 10:33 AM
Subject: Re: static functions
>
>int anotherFunction()
>{
> static int beenHere; // declared in same memory segment as "foofoo"
> // but is only available to this function. It
> // is not on the stack, and retains its value
> // between invocations of this function. Also, it
> // is not initialized until the first call to
> // this function.
>}
>
Not true. Because it is static, by definition it will be initialized to 0
(zero) before main() is called.
Cheers,
Scott.
W Komornicki's Home Page |
Main Index |
Thread Index