List all accounts. (ID and holdings)
#include <iostream>
#include <string>
#include "StockHolding.h"
using namespace std;
class CStockAccount
{
public:
//default constructor to initialize the ID to “NoID” and the cash balance to 10,000
CStockAccount(void);
//parameterized constructor to initialize the ID and the cash balance to specific values
CStockAccount(string, double);
~CStockAccount(void);
private:
//private function to find the index of the stock symbol in the array m_Holdings.
//Return -1 if not found.
int searchSymbol(string);
//private member to count how many kinds of stock held
int m_StockCount;
};
CStockAccount stock_accounts[10];
Comments
Leave a comment