I've tried every possible combination of *'s and &'s. I can't figure out what is wrong with this program and what is causing this compile time error
I'm getting this error:
error: initialization makes pointer from integer without a cast
compilation terminated due to -Wfatal-errors.
With this code:
int main() {
unsigned int ten = (int) 10;
unsigned short *a = (short) 89;
unsigned int *p =(int) 1;
unsigned short *q = (short) 10;
unsigned short *s = (short) 29;
function(ten,a,p, q, s);
return 0;
}
The function prototype is:
int function(unsigned int a, unsigned short *const b,
unsigned int *const c,
unsigned short *const d,
unsigned short *const e);
The function is empty, I'm just trying to get it to compile with an input file.