Reputation: 1017
When trying to pass in an array as a param I get:
"No matching function to call to ' table::retrieve(const char[16], item&, int)'
I am trying to call the function with
program.reference.retrieve("Abecean Longfin", program.client_item, 1);
the function is
int table::retrieve(char item_in[],item*item_list, int name_flag)
I'm sure this is something simple I don't understand, but I'm new to it.
Upvotes: 1
Views: 1203
Reputation: 146940
The real reason your call is failing is because you're passing an item&
where your function takes an item*
. Your code also violates const correctness on the string, but in C++03 they have a special rule which makes that legal.
Upvotes: 5