|
From: Chris M. <lor...@gm...> - 2007-08-17 17:45:06
|
http://en.wikipedia.org/wiki/Factory_method_pattern http://en.wikipedia.org/wiki/Abstract_factory_pattern http://en.wikipedia.org/wiki/Singleton_pattern That's the easiest way I know of to create objects based on user input. Whenever you create an object, it needs to be hard coded somehow (otherwise you'd be using memory that's not yours!) but I think you just want to know how to make objects that are sensitive to pre-existing conditions in the executing environment. On 8/17/07, Tan, Clarencio <Cla...@an...> wrote: > Hi Guys, > > Can anyone tell me how to create objects (of a particular class) without > hard coding them? I want the program to prompt me to input a string of > characters then make an object of that name. I have thought of using cin > but I am still unsuccessful. Thanks for your time. > > Regards to all! > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Dev-cpp-users mailing list > Dev...@li... > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > |