Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!maverick.ksu.ksu.edu!uafhp!uafcseg!bbs00068 From: bbs00068@uafcseg.uucp (Joel Kolstad) Newsgroups: comp.lang.c Subject: Silly question... Keywords: . Message-ID: <4877@uafhp.uark.edu> Date: 6 Jul 90 02:58:51 GMT Sender: netnews@uafhp.uark.edu Distribution: usa Organization: College of Engineering, University of Arkansas, Fayetteville Lines: 22 OK, You C Gurus out there... tell me something... I want to go off and allocate 2K of memory where I can store a bunch on numbers from 0-255. This is on a PC, and the unsigned chars on my C compiler are 8 bits... So, I thought I'd do this: typedef unsigned char MyBytes; MyBytes Mem[]; Mem=(MyBytes *) calloc(MemSize,1); /* MemSize=2048 */ But my compiler doesn't like this! Instead, I have to replace the second line with: MyBytes *Mem; This is certainly equivalent, and the compiler eats it, but why doesn't the first method work!?!? Thanks! Please mail replies to kolstad@cae.wisc.edu, since I don't log onto this BBS to often (cae.wisc.edu is unable to post news right now!) ---Joel Kolstad