|
|
Home » Extra libraries, Code snippets, applications etc. » C++ language problems and code snippets » Constructor with parameter
|
|
|
Re: Constructor with parameter [message #9519 is a reply to message #9518] |
Mon, 14 May 2007 11:32 |
Zardos
Messages: 62 Registered: April 2007
|
Member |
|
|
I guess in the example from luzr you can not construct the two dialogs with different titles as members directly:
class MainDialog : public TopWindow
{
....
// Does not work!
EditDialog createDlg("Neuen Eintrag erstellen");
EditDialog editDlg("Eintrag editieren");
....
}
};
Instead I would just call the Title function in the constructor in MainDialog:
class MainDialog : public TopWindow
{
MainDialog()
{
createDlg.Title("Neuen Eintrag erstellen");
editDlg.Ttile("Eintrag editieren");
}
....
EditDialog createDlg;
EditDialog editDlg;
....
}
};
[Updated on: Mon, 14 May 2007 11:32] Report message to a moderator
|
|
|
|
|
|
|
Goto Forum:
Current Time: Thu Apr 25 19:37:43 CEST 2024
Total time taken to generate the page: 0.03770 seconds
|
|
|