What's Wrong with this C Excert
Albert Wu
ezab066 at ut-emx.UUCP
Wed Aug 1 23:35:27 AEST 1990
The following is part of an example I saw on p.301 of Byron S.
Gottfried's Schaum's Outline Series "Programming with C", copyrighted
1990. It doesn't compile. Can anyone tell me what's wrong ? I am
a total beginner in C. Pls don't laugh.
#include <stdio.h>
#define MAXCOLS 30
main()
{
int (*a)[MAXCOLS],(*b)[MAXCOLS],(*c)[MAXCOLS];
.........
*a = (int*) malloc (rows * ncols * sizeof(nt));
*b = (int*) malloc ( nrows * ncols * sizeof(int));
*c =(int*) malloc ( nrows * ncols * sizeof(int));
}
More information about the Comp.lang.c
mailing list