Re: [Dev-C++] I am rusty - help with strings please!
Open Source C & C++ IDE for Windows
Brought to you by:
claplace
|
From: Daniel G. <sp...@ho...> - 2002-10-17 13:47:57
|
No for a document for my place of employment. >From: Per Westermark <pw...@ia...> >To: Daniel Glenfield <sp...@ho...> >CC: dev...@li... >Subject: Re: [Dev-C++] I am rusty - help with strings please! >Date: Thu, 17 Oct 2002 15:22:56 +0200 (CEST) > >Are you possibly requesting help for a class-room assignment? > >/Per W > >On Thu, 17 Oct 2002, Daniel Glenfield wrote: > > > > > > > My skills are shot. > > > > I am trying to create a quick program that has a class with a private >member > > that is an employee's name, and one of the member functions (public) >returns > > a pointer to that private member (it's an example of what not to do). > > > > The program's main function should go like this: > > > > Create a class object. > > Create a global pointer. > > Ask for user name. > > Call SetEmployeeName passing the object to it. > > Set the typed string to be the private member EmpName. > > Return to main. > > Call GetEmployeeName, passing the object to it. > > Assign the private member EmpName to the global pointer. > > Return the pointer to main. > > Show what the pointer is pointing at (for example cout<< *GlobalPointer ><< > > endl;) > > > > > > any refinements would be great. Remember this is an example of what not >to > > do (returning pointers to private members). I have trouble putting the > > string in to the object's data member, so I could do with some help! > > > > > > > > > > > > _________________________________________________________________ > > Protect your PC - get McAfee.com VirusScan Online > > http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963 > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: viaVerio will pay you up to > > $1,000 for every account that you consolidate with us. > > http://ad.doubleclick.net/clk;4749864;7604308;v? > > http://www.viaverio.com/consolidator/osdn.cfm > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www.noicys.cjb.net/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > _________________________________________________________________ Surf the Web without missing calls! Get MSN Broadband. http://resourcecenter.msn.com/access/plans/freeactivation.asp |