Im getting an error when trying to initialize some some objects of a class. I am supposed to initialize the accounts 12387.87, "Ralph Wilson" 144.00, "A. Connors"-11.23, "I. M. Overdrawn" like such p[<const>] = new account(<amt in account>,"name of holder of account"); but it wont let me. Here is my code(class included) please help me out.
#include <iostream>;
#include <string>;
using namespace std;
class account {
public:
account(double n, char *s); //make names array of char then convert to string
account(const account &rhs);
~account();
double get_bal();
char *get_name();
void print_balance (account &account_to_print);
void print_all_balances(account **p);
void delete_accounts(account **p);
private:
double cur_bal;
char *name;
};
/* Here is the main/////////////////////////////////////////////////////