passing 1-D arrays by reference
this is actually a question about programming in c, but I didn't see a c community, and c++ is close to c.
char key[21];
function call within int main():
readarray(input, &key);
function declaration:
void readarray(FILE *input, char *key[]);
I've tried various combinations, such as altering the call to &key[], but I still get an error
I get warnings about the array, "incompatible data type"
Thanks in advance.
char key[21];
function call within int main():
readarray(input, &key);
function declaration:
void readarray(FILE *input, char *key[]);
I've tried various combinations, such as altering the call to &key[], but I still get an error
I get warnings about the array, "incompatible data type"
Thanks in advance.
