🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.mac.programmer.codewarrior
Article #928

Re: What am I doing wrong? 'illegal constant expression'??

#928
From: Daniel T.
Date: Sat, 12 Oct 2002 23:22
47 lines
2369 bytes
News Reader <nntp@r.us> wrote:

> What am I doing wrong here?  I'm using Codewarrior8 on MacOSX.  All
> this compiled fine before under Codewarrior7 on MacOSX.
> What am I missing?  I'm using CW8's MacOSX target setting (not Apple's
> MacOSX).
> 
> 
> Error   : illegal constant expression
> (included from:
>  IOKitLib.h:48
>  CGDisplayConfiguration.h:11
>  CoreGraphics.h:20
>  QD.h:25
>  ApplicationServices.h:30
>  carbon.h:24
>  MgcOpenGLIncludes.h:26
>  MgcOpenGLRenderer.h:23
>  MgcAglRenderer.h:22
>  MgcAglRenderer.cpp:21)
> OSMessageNotification.h line 83   unsigned char content[0];
> 
> Error   : illegal constant expression
> (included from:
>  IOKitLib.h:48
>  CGDisplayConfiguration.h:11
>  CoreGraphics.h:20
>  QD.h:25
>  ApplicationServices.h:30
>  carbon.h:24
>  MgcOpenGLIncludes.h:26
>  MgcOpenGLRenderer.h:23
>  MgcAglRenderer.h:22
>  MgcAglRenderer.cpp:21)
> OSMessageNotification.h line 93   void * args[0];
> 
> 
> 
> I can't have an array of size 1??

To get an array size of 1 you need to:

unsigned char content[1];

Then you access that element by using:

content[0];
Technical Details
Message-ID: <a-66F6AF.19222012102002@nnrp06.earthlink.net>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!wn14feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail
References: <b80cquo5frrpptgjbg8v0juu5d2dom7hk9@4ax.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 10bcce,54136c2220b9e666
X-Google-Attributes: gid10bcce,public
X-Google-Thread: f635e,54136c2220b9e666
X-Google-Attributes: gidf635e,public
X-Google-ArrivalTime: 2002-10-12 16:22:05 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!wn11feed!wn14feed!worldnet.att.net!207.217.77.102!newsfeed2.earthlink.net!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!newsread2.prod.itd.earthlink.net.POSTED!not-for-mail
From: "Daniel T." <a@b.c>
Newsgroups: comp.sys.mac.programmer.codewarrior,codewarrior.mac
Subject: Re: What am I doing wrong?  'illegal constant expression'??
References: <b80cquo5frrpptgjbg8v0juu5d2dom7hk9@4ax.com>
Posted-And-Mailed: yes
User-Agent: MT-NewsWatcher/3.2 (PPC Mac OS X)
Message-ID: <a-66F6AF.19222012102002@nnrp06.earthlink.net>
Lines: 47
Date: Sat, 12 Oct 2002 23:22:07 GMT
NNTP-Posting-Host: 24.170.134.143
X-Complaints-To: abuse@earthlink.net
X-Trace: newsread2.prod.itd.earthlink.net 1034464927 24.170.134.143 (Sat, 12 Oct 2002 16:22:07 PDT)
NNTP-Posting-Date: Sat, 12 Oct 2002 16:22:07 PDT
Organization: EarthLink Inc. -- http://www.EarthLink.net