Message-ID: <38E906CC.884416FE@geocities.com> From: Sahab Yazdani Organization: PheonixSoft Inc. X-Mailer: Mozilla 4.7 [en] (Win98; I) X-Accept-Language: en MIME-Version: 1.0 Newsgroups: comp.os.msdos.djgpp Subject: Re: classes References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 38 Date: Mon, 03 Apr 2000 17:02:04 -0400 NNTP-Posting-Host: 209.5.17.203 X-Complaints-To: abuse AT sprint DOT ca X-Trace: newscontent-01.sprint.ca 954795806 209.5.17.203 (Mon, 03 Apr 2000 17:03:26 EDT) NNTP-Posting-Date: Mon, 03 Apr 2000 17:03:26 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com if you want the information contained in *stuff*.. this is the way that you would assign myClass that value... class myClass { char stuff[20]; myClass( char newValue[] ) { strcpy( stuff, newValue ); } }; void main() { myClass aClassName( stuff ); or } John wrote: > > I'm new to classes, Is the anyway that I would be able to do this? > > class myClass > { > // there would be things here > }; > > int main(void) > { > char stuff[20]; > cin>>stuff; > myClass stuff; // I want to name it the string > // stored in stuff not the word stuff > return 0; > } > thanks -- *********************************************************** * Sahab Yazdani * "We are all who we are, no more and no * * Thornhill S.S * less" - al'Lan Mandragoran * *********************************************************** * http://pheonixware.8m.com/ * ***********************************************************