Click here to Skip to main content
15,909,896 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: CScrollView to BitMap File Pin
georgekjolly14-Sep-06 22:36
georgekjolly14-Sep-06 22:36 
GeneralRe: CScrollView to BitMap File Pin
Hamid_RT15-Sep-06 1:22
Hamid_RT15-Sep-06 1:22 
QuestionUsing .obj created in VC++ in MASM Pin
Piteco13-Sep-06 4:52
Piteco13-Sep-06 4:52 
QuestionCould anyone expain the "Static" to me Pin
bloodwinner13-Sep-06 4:27
bloodwinner13-Sep-06 4:27 
AnswerRe: Could anyone expain the "Static" to me Pin
led mike13-Sep-06 4:33
led mike13-Sep-06 4:33 
AnswerRe: Could anyone expain the "Static" to me Pin
toxcct13-Sep-06 4:35
toxcct13-Sep-06 4:35 
GeneralRe: Could anyone expain the "Static" to me Pin
bloodwinner13-Sep-06 5:01
bloodwinner13-Sep-06 5:01 
GeneralRe: Could anyone expain the "Static" to me Pin
toxcct13-Sep-06 5:12
toxcct13-Sep-06 5:12 
static has another meaning. when you declare a variable local to a function as static, then is keeps its last value :

void foo() {
    static int i = 0;
    i++;
    printf("%d\n", i);
}
 
void main() {
    for (int n = 0; n < 5; n++) {
        foo();
    }
}

this prints :
1<br />
2<br />
3<br />
4<br />
5


another meaning is when you declare a class data member as static. this means that the member is shared between every instances of the class. this is useful when you want a member to be unique, like an instances counter, class constants, etc...

the last meaning is when declaring a class member function as static. it will tell that the function is a class function ; it doesn't know a particuliar instance (no this pointer), it performs general operations...


TOXCCT >>> GEII power

[VisualCalc 3.0  updated ][Flags Beginner's Guide  new! ]

AnswerRe: Could anyone expain the "Static" to me Pin
Lilith.C13-Sep-06 17:45
Lilith.C13-Sep-06 17:45 
GeneralRe: Could anyone expain the "Static" to me Pin
Akt_4_U13-Sep-06 17:49
Akt_4_U13-Sep-06 17:49 
AnswerRe: Could anyone expain the "Static" to me Pin
Hamid_RT14-Sep-06 8:53
Hamid_RT14-Sep-06 8:53 
QuestionInternal working of Try/Catch Pin
DavJes13-Sep-06 4:26
DavJes13-Sep-06 4:26 
AnswerRe: Internal working of Try/Catch Pin
led mike13-Sep-06 4:35
led mike13-Sep-06 4:35 
QuestionMySQL with MFC Pin
dcb123456713-Sep-06 4:18
dcb123456713-Sep-06 4:18 
AnswerRe: MySQL with MFC Pin
Chris Losinger13-Sep-06 5:08
professionalChris Losinger13-Sep-06 5:08 
QuestionCString Convert to LPCTSTR Pin
rxgmoral13-Sep-06 3:59
rxgmoral13-Sep-06 3:59 
QuestionRe: CString Convert to LPCTSTR Pin
prasad_som13-Sep-06 4:05
prasad_som13-Sep-06 4:05 
AnswerRe: CString Convert to LPCTSTR Pin
Zac Howland13-Sep-06 4:20
Zac Howland13-Sep-06 4:20 
AnswerRe: CString Convert to LPCTSTR Pin
toxcct13-Sep-06 4:21
toxcct13-Sep-06 4:21 
AnswerRe: CString Convert to LPCTSTR Pin
David Crow13-Sep-06 4:30
David Crow13-Sep-06 4:30 
AnswerRe: CString Convert to LPCTSTR Pin
Steve S13-Sep-06 6:34
Steve S13-Sep-06 6:34 
AnswerRe: CString Convert to LPCTSTR Pin
ThatsAlok13-Sep-06 18:51
ThatsAlok13-Sep-06 18:51 
AnswerRe: CString Convert to LPCTSTR Pin
Hamid_RT14-Sep-06 8:39
Hamid_RT14-Sep-06 8:39 
Question[Message Deleted] Pin
KKumarTG13-Sep-06 3:44
KKumarTG13-Sep-06 3:44 
AnswerRe: Exception in C++ Pin
Cedric Moonen13-Sep-06 3:46
Cedric Moonen13-Sep-06 3:46 

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.