I had written this function [ total_tax() ] which takes an array of objects of type tax and does some calculations on the private members of objects of tax.
The friend function declaration in class tax is as follows
void total_tax (const tax *Tax)
float Total = 0, Tax_Value;
for (int i=0;i<300;i++)
Total += *(Tax + i)->charge ;
Tax_Value = .4 * Total;
cout <<"\n The total tax to be paid is "<<Tax_Value;
The main() is as follows..
friend void total_tax (const tax*);
This however doesn't compile. I get errors like
int i = 0;
Array[i] = new tax (3000);
Array[i] = new tax (5000);
syntax error : missing ',' before '*'
left of '->charge' must point to class/struct/union
Please help.....my OOP test is on Saturday ....