Click here to Skip to main content
16,016,770 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
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 
Same result, this code:
<br />
int create2( )<br />
{<br />
    static int p = 0;<br />
    p++;    <br />
	return p;<br />
}<br />
<br />
::printf("%d %d", create2(), create2());<br />


produces the result:
2 1

Same as before. A breakpoint at "return p" gives the same result as before (of course).
Have you tried it yourself?



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

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 
AnswerRe: o Pin
_AnsHUMAN_ 25-Oct-06 0:35
_AnsHUMAN_ 25-Oct-06 0:35 
AnswerRe: o Pin
toxcct25-Oct-06 0:39
toxcct25-Oct-06 0:39 
GeneralRe: o Pin
zizzzz25-Oct-06 0:55
zizzzz25-Oct-06 0:55 
GeneralRe: o Pin
Oliver12325-Oct-06 10:17
Oliver12325-Oct-06 10:17 

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.