Reputation: 1
i am facing problem in passing STL list obj b reference, here is the code using prototype
void input(list<string>& *x[])
declaring in main
list<string> *table[SIZE];
input(table); //calling
any help would be apprecited.
Upvotes: 0
Views: 685
Reputation: 40613
Your function is attempting to take a pointer to a pointer to a reference to a list<string>
. Your problem is that it is impossible to create a pointer to a reference.
You should instead try making a reference to an array of pointers to list<string>
:
void input(list<string> *(&x)[SIZE])
Upvotes: 5