Okay, this is driving me insane...
The compiler error I'm getting says I am trying to convert a void to an account? I don't see why it thinks I'm trying to do that... Maybe you guys can help me out.
void get_accounts(account a[], int n);
int add_customer(account a[], int n);
int main()
{
ifstream in_file("cur_customers.txt");
vector<account> vec_account;
get_accounts(in_file, vec_account, maximum_num_bills_allowed);
return 0;
}
void get_accounts(ifstream in_file, vector<account> v, int n);
{ int i;
while(!in_file.eof())
{
string acct_num,first,last,address,city,state,phone;
double balance, charge;
int num_on_tab;
account temp;
infile>>acct_num>>first>>last>>address>>city>>state>>phone
>>num_on_tab;
for (i=0; i < num_on_tab; ++i)
{
infile>>charge;
temp.write_add_outstanding_bill_to_tab(charge);
}
temp.write_acct_num(acct_num);
temp.write_first(first);
temp.write_last(last);
temp.write_address(address);
temp.write_city(city);
temp.write_state(state);
temp.write_phone(phone);
temp.write_num_on_tab(num_on_tab);
v.push_back(temp);
}
}
And these are the errors I am getting...
[pt084@cs program8]$ c++ code.cpp
code.cpp: In function `int main()':
code.cpp:226: invalid conversion from `void*' to `account*'
code.cpp:226: cannot convert `std::vector<account, std::allocator<account> >'
to `int' for argument `2' to `void get_accounts(account*, int)'
code.cpp: At global scope:
code.cpp:234: syntax error before `{' token
code.cpp:242: syntax error before `>>' token
code.cpp:245: syntax error before `;' token
code.cpp:248: syntax error before `.' token
code.cpp:252: syntax error before `.' token
code.cpp:253: syntax error before `.' token
code.cpp:254: syntax error before `.' token
code.cpp:255: syntax error before `.' token
code.cpp:256: syntax error before `.' token
code.cpp:257: syntax error before `.' token
code.cpp:258: syntax error before `.' token
code.cpp:259: syntax error before `.' token
code.cpp:262: syntax error before `.' token
-Thanks
Andy