Re: [Dev-C++] Help with creating objects dynamically
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Graham D. <g.d...@nt...> - 2003-07-21 18:11:31
|
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html;charset=ISO-8859-1"> <title></title> </head> <body> <br> <br> Satish Medepalli wrote:<br> <blockquote type="cite" cite="mid...@we..."> <pre wrap="">Hello, I have the following requirement while creating objects.. I will try to explain it using a small example.. Suppose I have a class Student defined and I want to create objects of type Student inside the main function.. And say, the actual name with which i want to create the obect is stored in a character array at run time.. say i have the following statement char NAME[]=getName();</pre> </blockquote> You can't do that, either<br> <blockquote type="cite" cite="mid...@we..."> <pre wrap=""> and the above function is returning the name "JOHN" at run time. Now i want to get the name out of the character array and create the object using that particular name at run time.. i.e., Student JOHN; in a nutshell i want to give the name of the objects to be created at run time. IS THIS POSSIBLE?? IF SO CAN ANYONE HELP ME WITH THIS??</pre> </blockquote> No, it's not and, like others I can't see a need.<br> <blockquote type="cite" cite="mid...@we..."> <pre wrap=""> Thank You in advance. -Sateesh Medepalli __________________________________ Do you Yahoo!? SBC Yahoo! DSL - Now only $29.95 per month! <a class="moz-txt-link-freetext" href="http://sbc.yahoo.com">http://sbc.yahoo.com</a> ------------------------------------------------------- This SF.net email is sponsored by: VM Ware With VMware you can run multiple operating systems on a single machine. WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the same time. Free trial click here: <a class="moz-txt-link-freetext" href="http://www.vmware.com/wl/offer/345/0">http://www.vmware.com/wl/offer/345/0</a> _______________________________________________ Dev-cpp-users mailing list <a class="moz-txt-link-abbreviated" href="mailto:Dev...@li...">Dev...@li...</a> TO UNSUBSCRIBE: <a class="moz-txt-link-freetext" href="http://www23.brinkster.com/noicys/devcpp/ub.htm">http://www23.brinkster.com/noicys/devcpp/ub.htm</a> <a class="moz-txt-link-freetext" href="https://lists.sourceforge.net/lists/listinfo/dev-cpp-users">https://lists.sourceforge.net/lists/listinfo/dev-cpp-users</a> </pre> </blockquote> </body> </html> |