M
mdh
A Happy Easter to all.
#include <stdio.h>
static char mnths[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
int main () {
int i;
for (i=1; i<=12; i++)
/**printf("%d\n", mnths); works**/
printf("%d\n", *mnths++); **/<<<<error:wrong type arg to increment**/
return 0;
}
Could someone perhaps enlighten me...I thought an array was passed as
a pointer...but obviously, am missing something.
Thanks in advance.
#include <stdio.h>
static char mnths[] = {0,1,2,3,4,5,6,7,8,9,10,11,12};
int main () {
int i;
for (i=1; i<=12; i++)
/**printf("%d\n", mnths); works**/
printf("%d\n", *mnths++); **/<<<<error:wrong type arg to increment**/
return 0;
}
Could someone perhaps enlighten me...I thought an array was passed as
a pointer...but obviously, am missing something.
Thanks in advance.