Click here to Skip to main content
15,924,196 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to use Interface?? Pin
Erik Thompson24-Jan-01 7:11
sitebuilderErik Thompson24-Jan-01 7:11 
GeneralIrDA under WInCE Pin
Alex Gusev23-Jan-01 23:53
Alex Gusev23-Jan-01 23:53 
GeneralCLS in a DOS box Pin
jerry0davis23-Jan-01 23:51
jerry0davis23-Jan-01 23:51 
GeneralRe: CLS in a DOS box Pin
Tim Deveaux24-Jan-01 4:05
Tim Deveaux24-Jan-01 4:05 
GeneralMutli_Threading ( WaitForMultipleObject) Pin
.::RockNix::.23-Jan-01 23:40
.::RockNix::.23-Jan-01 23:40 
GeneralModern shortcuts Pin
23-Jan-01 23:31
suss23-Jan-01 23:31 
QuestionWhat is const = 0 Pin
23-Jan-01 23:00
suss23-Jan-01 23:00 
AnswerRe: What is const = 0 Pin
Matt.W.24-Jan-01 0:12
Matt.W.24-Jan-01 0:12 
Rene,

In a word Yes. This is a pure virtual function as it is declared virtual, and trails with "= 0". Any function following these rules is pure virtual. I think maybe what has confused you is that it appears to be "const = 0" when in fact "const" and "= 0" are two different specifiers.

>> virtual CDocument* GetNextDoc( POSITION& rPos ) const = 0;

I believe that the "const" declaration has confused you. Let me try to clarify it for you. The const keyword can be applied in various positions in the function declaration. In this example the const trails the declaration. This means that the function cannot modifiy the object which it belongs to, (CDocTemplate). This is commonly used for "get" type functions where you want a value but do not want the object to change what-so-ever.

It is not a necessary piece of syntax but it is very helpful, because at a glance you can tell that the function cannot legally change object to which it belongs. If you wanted to find out more look it up in the MSDN, it can seem quite tricky especially when applied to pointers!

Hope this helps.
Wink | ;)

Accept that some days you are the pigeon and some days the statue.
GeneralProblem with a tree view !!! Pin
Walid MEDDEB23-Jan-01 22:15
Walid MEDDEB23-Jan-01 22:15 
GeneralRe: Problem with a tree view !!! Pin
David Fedolfi25-Jan-01 6:05
David Fedolfi25-Jan-01 6:05 
GeneralRe: Problem with a tree view !!! Pin
25-Jan-01 21:58
suss25-Jan-01 21:58 
GeneralRe: Problem with a tree view !!! Pin
Walid MEDDEB26-Jan-01 5:44
Walid MEDDEB26-Jan-01 5:44 
Generalquestio about pointer Pin
Ahmad23-Jan-01 22:00
Ahmad23-Jan-01 22:00 
GeneralRe: questio about pointer Pin
Walter Gildersleeve24-Jan-01 0:55
Walter Gildersleeve24-Jan-01 0:55 
GeneralCompiler - Error Pin
.::RockNix::.23-Jan-01 21:56
.::RockNix::.23-Jan-01 21:56 
GeneralRe: Compiler - Error Pin
Michael Dunn24-Jan-01 6:50
sitebuilderMichael Dunn24-Jan-01 6:50 
GeneralRe: Compiler - Error Pin
AlexMarbus24-Jan-01 7:06
AlexMarbus24-Jan-01 7:06 
QuestionDHTML article?? Pin
Amit Dey23-Jan-01 20:51
Amit Dey23-Jan-01 20:51 
Generalfree e-books about VISUAL C++ Pin
23-Jan-01 20:37
suss23-Jan-01 20:37 
GeneralRe: free e-books about VISUAL C++ Pin
Ahmad23-Jan-01 20:40
Ahmad23-Jan-01 20:40 
Generalquestio about winmain Pin
Ahmad23-Jan-01 20:34
Ahmad23-Jan-01 20:34 
GeneralRe: questio about winmain Pin
Ghazi H. Wadi24-Jan-01 7:35
Ghazi H. Wadi24-Jan-01 7:35 
GeneralNeed more help on the file listing Pin
23-Jan-01 13:28
suss23-Jan-01 13:28 
GeneralRe: Need more help on the file listing Pin
Michael Dunn23-Jan-01 16:42
sitebuilderMichael Dunn23-Jan-01 16:42 
GeneralRe: Need more help on the file listing Pin
24-Jan-01 7:12
suss24-Jan-01 7:12 

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.