Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10 beta 3/9/83; site vaxine.UUCP Path: utzoo!linus!vaxine!ptw From: ptw@vaxine.UUCP (P. T. Withington) Newsgroups: net.lang.c Subject: Re: Why can't I do this? Message-ID: <158@vaxine.UUCP> Date: Mon, 16-Jan-84 12:01:48 EST Article-I.D.: vaxine.158 Posted: Mon Jan 16 12:01:48 1984 Date-Received: Tue, 17-Jan-84 02:07:41 EST References: <2386@rabbit.UUCP> Organization: Automatix Inc., Billerica, MA Lines: 30 Well. I got lots of replies to my query that told me I couldn't do what I wanted to do because I was doing something illegal. Well, I knew that. The compiler told me so. I guess what I really should have asked is: "How can I do this"? It seemed to me that there ought to be a way to initialize an array of pointers to things other than char. Two solutions were suggested: 1) Don't do it that way; declare it as a ?*n array (either implicity or explicitly). Which wastes the space I was trying to conserve. (? is really very large in my case and n ranges between 3 and 7.) 2) Declare a lot of useless 1-dim arrays followed by a declaration of the array of pointers. Which is more in the spirit of things, but since ? is so big (see above) leads to a lot of unnecessary clutter and doesn't sound like C to me. I thought that maybe: int *bar[] = {&{0, 1, 2, ... would do, but my compiler doesn't like that either. Of course, my ints are all very small so I *could* say: char *bar[] = {"\0\1\2", ... Yuk! Maybe it's just not important to worry about that many bytes any more. Maybe its something that just isn't done enough to create a hulluballoo over. -ptw