c - "value is neither array nor pointer nor vector" in my easy program -
please can me easy program? begginer , english not good, hard understand. :/
program:
void tisk_pole (p); int main() { char p1[3][3]={{'1','2','3'},{'4','5','6'},{'7','8','9'}}; tisk_pole(p1); return 0; } void tisk_pole (p){ int i, j; (i = 0; < 3; i++){ (j = 0; j < 3; j++) printf("%c", p[i][j]); //here problem -> value neither array nor pointer nor vector putchar('\n'); } }
please, can me solve problem? thank much.
you're missing type declaration of argument p
.
void tisk_pole(char p[3][3]) { int i, j; (i = 0; < 3; i++){ (j = 0; j < 3; j++) printf("%c", p[i][j]); putchar('\n'); } }
see c function parameter without type indicator still works? how compilers treat parameter no type.
Comments
Post a Comment