www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/07/15/11:49:09

Xref: news2.mv.net comp.os.msdos.djgpp:5976
From: Bob Platko <platko AT ix DOT netcom DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Why does this code not work?
Date: Sun, 14 Jul 1996 22:11:59 -0400
Organization: Netcom
Lines: 24
Message-ID: <31E9A8EF.7347@ix.netcom.com>
References: <31E983BD DOT 756D AT ix DOT netcom DOT com>
NNTP-Posting-Host: clv-oh13-41.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Bob Platko wrote:
> 
> I can't get the following code to work in GCC.  I keep getting warnings that the
> array has elements past what I defined the limit.  It compiles perfectly in TCC.
> 
> --code--
> 
> const MAXPOLYS   = 5;
> const POLYPOINTS = 4;
> const POLYCORDS  = 3;
> 
> 
> signed short A[MAXPOLYS][POLYPOINTS][MAXPOLYS] =
>             {
>               { {-10, 10, 0},{ -2,-10, 0},{ 0,-10, 0},{ -5,10, 0} },
>               { { -2,-10, 0},{  2,-10, 0},{ 2, -5, 0},{ -2,-5, 0} },
>               { { -6,  0, 0},{  6,  0, 0},{ 7,  5, 0},{ -7, 5, 0} },
>               { { 10, 10, 0},{  2,-10, 0},{ 0,-10, 0},{  5,10, 0} },
>               { {  0,  0, 0},{  0,  0, 0},{ 0,  0, 0},{  0, 0, 0} } };
> 
> --end--


Never mind.  I got it to work just fine.  I changed the const's to #define's.

- Raw text -


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