I'm farly new to C and am working on this problem. First of all, is it possible to point to arrays using pointers? Is it possible to point to a full array?? (meaning all the variables in the arrays, as opposed to just one - i.e. x[10] )
Well, I honestly dont know so i thought id give it a try, and I get this one error message:
proj4.c: In function 'main':
proj4.c:23: warning: passing argument 1 of 'main_menu' from incompatible pointer type
And this is my code:
the prototype for the main_menu function is:
Any help would be greatly appreciated. Thanks
Well, I honestly dont know so i thought id give it a try, and I get this one error message:
proj4.c: In function 'main':
proj4.c:23: warning: passing argument 1 of 'main_menu' from incompatible pointer type
And this is my code:
| Code: |
|
//#define MAX_SIZE 200 //#define MIN_SIZE 2 int main () { int x[MAX_SIZE]; int cur_size = MAX_SIZE/2; main_menu (&x, &cur_size); return 0; } |
the prototype for the main_menu function is:
| Code: |
|
void main_menu (int *a[], int *psize); |
Any help would be greatly appreciated. Thanks
