Click here to Skip to main content
15,901,426 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Look for:source code for Database table design Pin
wxshzf8-Dec-05 20:11
wxshzf8-Dec-05 20:11 
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 
Hallo

newbee confused

Ok i have a class car.h and a class carpark.h looking like this:
<br />
#include "car.h" // not important<br />
<br />
class carpark  <br />
{<br />
public:<br />
	carpark(int size);<br />
	~carpark();<br />
	<br />
	void insert(car *p1);<br />
<br />
	class Iterator;<br />
	friend class Iterator;<br />
	<br />
private:<br />
	car** array;<br />
};<br />
<br />
class carpark::Iterator<br />
{<br />
public:<br />
	Iterator(carpark &cp);<br />
	~Iterator();<br />
<br />
	void reset();<br />
	void next();<br />
	car* get();<br />
//private:<br />
	carpark &c;<br />
<br />
};<br />


Now how to implement Iterator ???

<br />
carpark::Iterator::Iterator(carpark &cp)<br />
{<br />
	c = cp;<br />
}<br />

this throws some error i dont understand
"'c' : must be initialized in constructor base/member initializer list"

and while using the defaultconstructor
i can't access the functions from Iterator
<br />
int main()<br />
{<br />
...<br />
	carpark::Iterator it();<br />
	it.reset(); // throws error "must have class/struct/union type"<br />
...<br />
}<br />


What to do - or where to read about something like this

Please Help Confused | :confused:

THX alot
AnswerRe: class subclass instance problem Pin
Bob Stanneveld8-Dec-05 9:41
Bob Stanneveld8-Dec-05 9:41 
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 

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.