Click here to Skip to main content
15,902,189 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 0:58
minkowski25-Oct-06 0:58 
GeneralRe: scope in functions Pin
Tim Paaschen25-Oct-06 1:03
Tim Paaschen25-Oct-06 1:03 
AnswerRe: scope in functions Pin
kakan25-Oct-06 1:10
professionalkakan25-Oct-06 1:10 
GeneralRe: scope in functions Pin
benjymous25-Oct-06 1:24
benjymous25-Oct-06 1:24 
GeneralRe: scope in functions Pin
kakan25-Oct-06 1:53
professionalkakan25-Oct-06 1:53 
GeneralRe: scope in functions Pin
benjymous25-Oct-06 3:29
benjymous25-Oct-06 3:29 
GeneralRe: scope in functions [modified] Pin
toxcct25-Oct-06 1:41
toxcct25-Oct-06 1:41 
GeneralRe: scope in functions [modified] Pin
kakan25-Oct-06 1:53
professionalkakan25-Oct-06 1:53 
Correct me if I'm wrong, but as far as I remember, a static variable gets a fixed position on the heap.
If I'm right, what's the danger with calling the function more than once?


-- modified at 7:59 Wednesday 25th October, 2006

Now I've checked your code. It returns 5 both times.
BTW, you mean
::printf("%d %d", *(create()), *(create()));
don't you?



Alcohol. The cause of, and the solution to, all of life's problems - Homer Simpson

GeneralRe: scope in functions Pin
toxcct25-Oct-06 2:25
toxcct25-Oct-06 2:25 
GeneralRe: scope in functions Pin
kakan25-Oct-06 3:26
professionalkakan25-Oct-06 3:26 
GeneralRe: scope in functions Pin
toxcct25-Oct-06 3:31
toxcct25-Oct-06 3:31 
GeneralRe: scope in functions Pin
kakan25-Oct-06 3:46
professionalkakan25-Oct-06 3:46 
GeneralRe: scope in functions Pin
toxcct25-Oct-06 3:51
toxcct25-Oct-06 3:51 
GeneralRe: scope in functions Pin
kakan25-Oct-06 4:01
professionalkakan25-Oct-06 4:01 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:07
minkowski25-Oct-06 4:07 
GeneralRe: scope in functions Pin
kakan25-Oct-06 4:10
professionalkakan25-Oct-06 4:10 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:21
minkowski25-Oct-06 4:21 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:29
minkowski25-Oct-06 4:29 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:40
minkowski25-Oct-06 4:40 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 4:49
minkowski25-Oct-06 4:49 
GeneralRe: scope in functions Pin
kakan25-Oct-06 19:53
professionalkakan25-Oct-06 19:53 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 23:02
minkowski25-Oct-06 23:02 
GeneralRe: scope in functions Pin
kakan25-Oct-06 23:47
professionalkakan25-Oct-06 23:47 
GeneralRe: scope in functions Pin
minkowski25-Oct-06 23:14
minkowski25-Oct-06 23:14 
GeneralRe: scope in functions Pin
Nemanja Trifunovic25-Oct-06 2:29
Nemanja Trifunovic25-Oct-06 2:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.