return value doesnt match the function
I am getting an error saying return value does not match the function type at the return sku part. Anyone knows why?
1 2 3
|
const char* NonPerishable::sku() const {
return sku;
}
|
and my sku is
char sku[31]
I don't think you can return arrays.
Last edited on
The name of the function sku in the inner scope hides the name of the array sku in the outer scope.
Topic archived. No new replies allowed.