Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!cs.utexas.edu!ut-emx!ezab066 From: ezab066@ut-emx.UUCP (Albert Wu) Newsgroups: comp.lang.c Subject: What's Wrong with this C Excert Message-ID: <34877@ut-emx.UUCP> Date: 1 Aug 90 13:35:27 GMT Reply-To: ezab066@hermes.chpc.utexas.edu (Albert Wu) Distribution: usa Organization: Center for Electromechanics, UT/Austin Lines: 20 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 #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)); }