Click here to Skip to main content
15,900,429 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Nope, a static gets inititalized just once.

So with your printf, the result gets this:
2 1

Well. I don't want to be rude, but if you change a variable, then the variable in question obviously gets changed...
static or not.

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

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 
AnswerRe: scope in functions Pin
cmk25-Oct-06 7:31
cmk25-Oct-06 7:31 
Questiono Pin
zizzzz25-Oct-06 0:27
zizzzz25-Oct-06 0:27 

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.