Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
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 Go to previous messageGo to previous message
Zardos is currently offline  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

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Unable to compile with Irrlicht
Next Topic: How to access other classes variables?
Goto Forum:
  


Current Time: Thu May 16 22:35:44 CEST 2024

Total time taken to generate the page: 0.02545 seconds