C
Chris Readle
Hi all,
Somewhat new to C and I'm getting the following error from my latest code.
Here's the warning I'm getting:
chris_readle_project3_assignment3.c: In function `main':
chris_readle_project3_assignment3.c:23: warning: passing arg 1 of
`displaySales' from incompatible pointer type
And here is the code in question:
void inputSales(float s[][PRODUCTS]);
void displaySales(const float s[][PRODUCTS]);
float sales[SALESPEOPLE][PRODUCTS] = {{0}, {0}, {0}, {0}};
inputSales(sales);
displaySales(sales); <---------This one gets the error
So, why am I getting the error and what does it mean? And why do I get
it on the second function call and not the first, which seems exactly
the same, other than being to a different function and not declaring the
parameter as a const?
crr
Somewhat new to C and I'm getting the following error from my latest code.
Here's the warning I'm getting:
chris_readle_project3_assignment3.c: In function `main':
chris_readle_project3_assignment3.c:23: warning: passing arg 1 of
`displaySales' from incompatible pointer type
And here is the code in question:
void inputSales(float s[][PRODUCTS]);
void displaySales(const float s[][PRODUCTS]);
float sales[SALESPEOPLE][PRODUCTS] = {{0}, {0}, {0}, {0}};
inputSales(sales);
displaySales(sales); <---------This one gets the error
So, why am I getting the error and what does it mean? And why do I get
it on the second function call and not the first, which seems exactly
the same, other than being to a different function and not declaring the
parameter as a const?
crr