delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/03/19/04:23:05

Newsgroups: comp.os.msdos.djgpp
From: manni AT hotbot DOT com (Manni Heumann)
Subject: Re: array subscript error
References: <7crlk8$57p$1 AT newsreader3 DOT core DOT theplanet DOT net>
X-Newsreader: News Xpress 2.01
Date: Fri, 19 Mar 1999 08:17:47 GMT
NNTP-Posting-Host: dhcp33-228.uni-bielefeld.de
Message-ID: <36f2082d.0@news.uni-bielefeld.de>
X-Trace: 19 Mar 1999 09:17:49 +0200, dhcp33-228.uni-bielefeld.de
Lines: 26
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp
Reply-To: djgpp AT delorie DOT com

In article <7crlk8$57p$1 AT newsreader3 DOT core DOT theplanet DOT net>, "Andy Kilner" <andy AT kilner DOT karoo DOT co DOT uk> wrote:

>Error: invalid types 'screen_ch[char]' for array subscript

I guess this applies to the next line:

>screen_ch* buffer = new screen_ch [ window.Area() ];

>I probably over complicated the info I've given but I'm just trying to make
>sure everything's there.

Well, either I have real trouble with my eyes or you didn't make sure: Who is 
window? What is Area().
I guess Area() returns char. Did you try casting it to int: 

..= new screen_ch [(int) window.Area()]; ?



----------------------------------------------------------------------
Manni Heumann
Bielefeld, Germany

Spammers use reply-address,
all others use:         mheumann AT post DOT uni-bielefeld DOT de
----------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019