>From: Mickey Mathieson <[EMAIL PROTECTED]>
>Reply-To: [email protected]
>To: [email protected]
>Subject: Re: [c-prog] Re: classes
>Date: Mon, 26 Mar 2007 13:10:50 -0700 (PDT)
>
>
>--- glogic_1 <[EMAIL PROTECTED]> wrote:
>
> > --- In [email protected], "glogic_1"
> > <[EMAIL PROTECTED]> wrote:
> > >
> > > Hey all
> > > I dont have the code for the following as i no
> > where know enough
> > about
> > > programming yet but here goes my question anyway.
> > > using classes i can create stuff like the
> > following
> > > class account{
> > > int accnum;
> > > char acctype;
> > > int balance;
> > > etc
> > > public:
> > > int getbalance(void);
> > > etc
> > > };
> > > now i save classes such as this as a .h file
> > > so to create each new account i would do this in
> > main cpp
> > > account Gavin;
> > > this would create a variable called gavin of type
> > account right?
> > > but how would i create accounts within the program
> > as its running
> > > without knowing before hand the account(in this
> > case Gavin) name ?
> > > or how would this be approached?
> > > hope this makes sense
> > > g
> > >
> >
> > would making a dynamic array of class account be the
> > right way to
> > handle this?
> >
> >
> >
>a dynamic array would work. Are you planning on saving
>the data to a file? If so you might not need the array
>but a pointer to the current record.
yeah i was going eventually have it so that it writes to a file but very
unsure of file handling.. will do some tutorials from the net and come back
to this one thanks
>
>
>
>Mickey M.
>Construction Partner Inc.
>http://www.constructionpartner.com
>
>
>
>
>____________________________________________________________________________________
>Need Mail bonding?
>Go to the Yahoo! Mail Q&A for great tips from Yahoo! Answers users.
>http://answers.yahoo.com/dir/?link=list&sid=396546091
_________________________________________________________________
The average US Credit Score is 675. The cost to see yours: $0 by Experian.
http://www.freecreditreport.com/pm/default.aspx?sc=660600&bcd=EMAILFOOTERAVERAGE