home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / c / 16242 < prev    next >
Encoding:
Text File  |  1992-11-09  |  775 b   |  24 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!munnari.oz.au!bruce.cs.monash.edu.au!monu6!yoyo.cc.monash.edu.au!bena
  3. From: bena@yoyo.cc.monash.edu.au (Ben Aveling)
  4. Subject: Re: Macros
  5. Message-ID: <1992Nov10.003412.14752@monu6.cc.monash.edu.au>
  6. Sender: news@monu6.cc.monash.edu.au (Usenet system)
  7. Organization: Monash University General Access Unix
  8. X-Newsreader: TIN [version 1.1 PL6]
  9. References: <1dfs04INNg3e@usenet.INS.CWRU.Edu>
  10. Date: Tue, 10 Nov 1992 00:34:12 GMT
  11. Lines: 11
  12.  
  13. William C. Thompson (wct@po.CWRU.Edu) wrote:
  14.  
  15. :   if (((A)=(double **)malloc(sizeof(double *)*(rows)))==NULL)
  16. :     printf("Allocation error!\n");
  17. :   for (i=0; i<(cols); i++)
  18.                  ^^^^
  19. :     if (((A)[i]=(double *)malloc(sizeof(double)*(cols)))==NULL)
  20.  
  21. Shouldn't that be rows ?
  22.     
  23.     Ben    :-)
  24.