Click here to Skip to main content
15,899,679 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Look for:source code for Database table design Pin
kakan8-Dec-05 21:06
professionalkakan8-Dec-05 21:06 
QuestionCEdit transparent background - text gets screwy Pin
Christian Graus8-Dec-05 11:48
protectorChristian Graus8-Dec-05 11:48 
AnswerRe: CEdit transparent background - text gets screwy Pin
Christian Graus8-Dec-05 12:02
protectorChristian Graus8-Dec-05 12:02 
GeneralRe: CEdit transparent background - text gets screwy Pin
PJ Arends8-Dec-05 12:34
professionalPJ Arends8-Dec-05 12:34 
GeneralRe: CEdit transparent background - text gets screwy Pin
Christian Graus8-Dec-05 12:42
protectorChristian Graus8-Dec-05 12:42 
QuestionWindows Enumeration Pin
Manu_818-Dec-05 9:52
Manu_818-Dec-05 9:52 
Questionclass subclass instance problem Pin
tbrake8-Dec-05 9:14
tbrake8-Dec-05 9:14 
AnswerRe: class subclass instance problem Pin
Bob Stanneveld8-Dec-05 9:41
Bob Stanneveld8-Dec-05 9:41 
Hello,

A constructor initializers list is a special place for initializing member variables of a class. The following example solves your problem:
class carpark::Iterator(carpark& cp)
              : c(cp)  // this here is the initializer list
{
}


I assume that you know how to implement the iterator, but here's one little tip for the road: your next() function should return a bool. This makes it more easy to iterate through your carpark:
// This is more conveniant
carpark cp;
// some code

// iterate 
carpark::Iterator iter(cp);

// do something with first car
if( /* are cars in carpark */ )
{
    // do something 
    // iterate over all other cars in park
    while( iter.next() )
    {
        // do something with other cars.
    }
}


Hope this helps Big Grin | :-D

Behind every great black man...
            ... is the police. - Conspiracy brother


Blog[^]
GeneralRe: class subclass instance problem Pin
tbrake8-Dec-05 9:52
tbrake8-Dec-05 9:52 
GeneralRe: class subclass instance problem Pin
Bob Stanneveld8-Dec-05 10:44
Bob Stanneveld8-Dec-05 10:44 
QuestionCannot hook FindNextFile Pin
gamitech8-Dec-05 6:37
gamitech8-Dec-05 6:37 
AnswerRe: Cannot hook FindNextFile Pin
Chris Losinger8-Dec-05 7:51
professionalChris Losinger8-Dec-05 7:51 
GeneralRe: Cannot hook FindNextFile Pin
gamitech8-Dec-05 8:46
gamitech8-Dec-05 8:46 
GeneralRe: Cannot hook FindNextFile Pin
Chris Losinger8-Dec-05 8:56
professionalChris Losinger8-Dec-05 8:56 
GeneralRe: Cannot hook FindNextFile Pin
ThatsAlok8-Dec-05 20:06
ThatsAlok8-Dec-05 20:06 
GeneralRe: Cannot hook FindNextFile Pin
gamitech10-Dec-05 4:27
gamitech10-Dec-05 4:27 
GeneralRe: Cannot hook FindNextFile Pin
ThatsAlok11-Dec-05 19:27
ThatsAlok11-Dec-05 19:27 
GeneralRe: Cannot hook FindNextFile Pin
gamitech15-Dec-05 3:16
gamitech15-Dec-05 3:16 
GeneralRe: Cannot hook FindNextFile Pin
ThatsAlok15-Dec-05 17:11
ThatsAlok15-Dec-05 17:11 
QuestionHalt processing until button is clicked Pin
Simon Cornish8-Dec-05 5:40
Simon Cornish8-Dec-05 5:40 
AnswerRe: Halt processing until button is clicked Pin
toxcct8-Dec-05 5:55
toxcct8-Dec-05 5:55 
GeneralRe: Halt processing until button is clicked Pin
Simon Cornish8-Dec-05 6:40
Simon Cornish8-Dec-05 6:40 
GeneralRe: Halt processing until button is clicked Pin
toxcct8-Dec-05 21:09
toxcct8-Dec-05 21:09 
QuestionON_WM_MOUSEMOVE() in a ActiveX Pin
sweep1238-Dec-05 4:45
sweep1238-Dec-05 4:45 
QuestionVisual C++ compiler error C2143 Pin
Emb_Emb8-Dec-05 4:44
Emb_Emb8-Dec-05 4:44 

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.