Answer to Question #30816 in C++ for Jake
using namespace std;
//default constructor to initialize the ID to “NoID” and the cash balance to 10,000
//parameterized constructor to initialize the ID and the cash balance to specific values
//destructor. Should be empty.
void addStock(string, int);
void deleteStock(string, int);
//data member for the ID
//data member for the cash balance
//data member for 10 stock holdings
//private function to find the index of the stock symbol in the array m_Holdings.
//Return -1 if not found.
toaccess you can do such things like:
stock_accounts.addStock(); and so on
2. Declare pointer to array (but dont forget to deleteit)
CStockAccount* p_stock_accounts = new CStockAccount ; //dosomething
3. Declare vector (or list) from STL
vector<CStockAccount> stock_account (10);
You also can addand delete elements from vector. And memory will be freed automatically.
Need a fast expert's response?Submit order
and get a quick answer at the best price
for any assignment or question with DETAILED EXPLANATIONS!
You're welcome. We are glad to be helpful.
If you really liked our service please press like-button beside answer field. Thank you!
I appreciate your generosity for your helpfulness