In this section:
void readId (int& i,int& id, int MAX_SIZE, int& count)
{
id [MAX_SIZE]; ****
count = 0;
do {
cin>>id[i];
}
while (count<MAX_SIZE);
It gives error 45 invalid types `int[int]' for array subscript at ******
In this code :
void readNameAddress (int& MAX_LINE, int& MAX_SIZE, string& name, string& address, string & line, string& inputString,int& count, int& position);
{
name [MAX_SIZE]; **************
address [MAX_SIZE];
line;
count =0;
do {
getline(cin, line);
int position = line.find (',');
name[count] = line.substr (0, position);
address[count] = line.substr (position+1, MAX_LINE);
count++;
}
while (count<MAX_SIZE);
for (int i=0; i<count; i++)
cout <<name[i]<<"\t"<<address[i]<<endl;
}
it gives error 56 `name' undeclared (first use this function) at *********
I'll leave it at that for starters...