At 04:48 2007-03-26, glogic_1 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

you likely either want to put a "name" element in your data, or 
perhaps use std::map<std::string, account> to hold them.

>g
>
>
>
>
>
>To unsubscribe, send a blank message to 
><mailto:[EMAIL PROTECTED]>.
>Yahoo! Groups Links
>
>
>

Victor A. Wagner Jr.      http://rudbek.com
The five most dangerous words in the English language:
               "There oughta be a law" 

Reply via email to