Click here to Skip to main content
15,912,329 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: static variable Pin
User 58385223-Aug-07 20:15
User 58385223-Aug-07 20:15 
GeneralRe: static variable Pin
George_George23-Aug-07 20:22
George_George23-Aug-07 20:22 
GeneralRe: static variable Pin
George_George23-Aug-07 20:27
George_George23-Aug-07 20:27 
GeneralRe: static variable Pin
ThatsAlok23-Aug-07 20:37
ThatsAlok23-Aug-07 20:37 
GeneralRe: static variable Pin
George_George23-Aug-07 20:55
George_George23-Aug-07 20:55 
GeneralRe: static variable Pin
ThatsAlok24-Aug-07 7:51
ThatsAlok24-Aug-07 7:51 
GeneralRe: static variable Pin
George_George23-Aug-07 20:19
George_George23-Aug-07 20:19 
GeneralRe: static variable Pin
User 58385223-Aug-07 20:29
User 58385223-Aug-07 20:29 
George_George wrote:
I am wondering how to modify the value of the static variable from other function (other than from the function in which it is defined)?


Sorry, my mistake as you cant do that.

You can however define a static in a class and access it from any of the methods in that class. Even const methods!
GeneralRe: static variable Pin
George_George23-Aug-07 20:31
George_George23-Aug-07 20:31 
GeneralRe: static variable Pin
User 58385223-Aug-07 20:36
User 58385223-Aug-07 20:36 
GeneralRe: static variable Pin
George_George23-Aug-07 20:51
George_George23-Aug-07 20:51 
GeneralRe: static variable Pin
User 58385223-Aug-07 20:55
User 58385223-Aug-07 20:55 
GeneralRe: static variable Pin
George_George23-Aug-07 22:27
George_George23-Aug-07 22:27 
AnswerRe: static variable Pin
ghle24-Aug-07 15:28
ghle24-Aug-07 15:28 
AnswerRe: static variable Pin
ghle25-Aug-07 4:04
ghle25-Aug-07 4:04 
GeneralRe: static variable Pin
George_George25-Aug-07 22:08
George_George25-Aug-07 22:08 
AnswerRe: static variable Pin
BadKarma23-Aug-07 22:10
BadKarma23-Aug-07 22:10 
GeneralRe: static variable Pin
George_George23-Aug-07 22:36
George_George23-Aug-07 22:36 
GeneralRe: static variable Pin
BadKarma23-Aug-07 23:24
BadKarma23-Aug-07 23:24 
GeneralRe: static variable Pin
George_George23-Aug-07 23:39
George_George23-Aug-07 23:39 
GeneralRe: static variable Pin
toxcct24-Aug-07 1:42
toxcct24-Aug-07 1:42 
GeneralRe: static variable Pin
George_George25-Aug-07 21:25
George_George25-Aug-07 21:25 
GeneralRe: static variable Pin
codeII24-Aug-07 1:49
codeII24-Aug-07 1:49 
GeneralRe: static variable Pin
George_George25-Aug-07 21:27
George_George25-Aug-07 21:27 
AnswerRe: static variable Pin
David Crow24-Aug-07 6:05
David Crow24-Aug-07 6:05 

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.