Say i have int *a, int *b, int *c and say a and b already point to some integers.
I want to add the integers down a and b and save them to wherever c is pointing to
This:
*c = *a + *b;
does not work. It always spits out "invalid argument of 'unary *'. Why so?
ADDITIONAL INFO: here's how I'm trying to implement it:
int getCoordinates(int argc, char *argv[], FILE *overlay, FILE *base, int *OVx, int *OVy, int *OVendx, int *OVendy, int *Bx, int *By, int *Bendx, int *Bendy)
{
... // OVx and OVw are assigned here. I know it works so I won't waste your time with this part.
// Set overlay image's x and y defaults (0,0).
*OVx = 0;
*OVy = 0;
...
OVendx = (*OVx) + (*OVw);
OVendy = (*OVy) + (*OVh);
cto point to a valid memory location ?