From: "Andrew Hurrell" Newsgroups: comp.os.msdos.djgpp Subject: Re: how do I use 2D variables Date: Sun, 30 Jan 2000 00:37:03 -0000 Organization: Customer of Planet Online Lines: 36 Message-ID: <872lf8$top$1@newsg3.svr.pol.co.uk> References: <8722e8$res$1 AT zingo DOT tninet DOT se> <3894BC87 DOT 8ED55889 AT geocities DOT com> NNTP-Posting-Host: modem-10.keyhole-butterfly.dialup.pol.co.uk X-Trace: newsg3.svr.pol.co.uk 949279016 30489 62.137.35.10 (31 Jan 2000 00:36:56 GMT) NNTP-Posting-Date: 31 Jan 2000 00:36:56 GMT X-Complaints-To: abuse AT theplanet DOT net X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.00.2014.211 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2014.211 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Or you could use a multidimensional array e.g. int a[10][10][10] and reference a[i][j][k] or use int **a and use malloc to dynamically allocate storage If you need some storage allocator code - drop me an email > if i understand correctly: > > // for 2d > struct twoD { > int x; > int y; > }; > > struct threeD { > int x; > int y; > int z; > }; > > void main() { > twoD a; > threeD b; > > a.x = 10; > b.z = 15; > } > > "Börje Granberg" wrote: > > > > How do I define and use 2D,3D etc. 'var(x,y)' I don't have a clue