www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/07/16/20:20:08

Sender: nate AT cartsys DOT com
Message-ID: <35AAEC96.2893C89E@cartsys.com>
Date: Mon, 13 Jul 1998 22:28:54 -0700
From: Nate Eldredge <nate AT cartsys DOT com>
MIME-Version: 1.0
To: MUHAMMAD101 AT cyberlib DOT itb DOT ac DOT id
CC: djgpp AT delorie DOT com
Subject: Re: big matrix/array
References: <35D0C6B0BF1 AT cyberlib DOT itb DOT ac DOT id.>

MUHAMMAD101 AT cyberlib DOT itb DOT ac DOT id wrote:
> 
> Hi all..
>     I'm new in C especially djgpp, but everything works fine at this time, the compiler, allegro, rhide.
>     Because I'm working with something need a big matrix, how can I do this with djgpp ?
>     With FPC Pascal I did it easyly
>      a : array[1..3000,1..3000];

You left out the `of whatever'.

>     And it works.
> Just it and thank very much for all of your attention and your help

You can use a 2-D array, but be sure to use this in conjunction with
your C text, because 2-D arrays have some confusing aspects.

var a : array [1..3000, 1..3000] of integer;

becomes

int a[3000][3000];

Also note that arrays in C are 0-based.


-- 

Nate Eldredge
nate AT cartsys DOT com


- Raw text -


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