From: "OmniMeta" Newsgroups: comp.os.msdos.djgpp Subject: What's the best way to make a 2d map Lines: 22 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 Message-ID: Date: Mon, 3 May 1999 23:20:51 -0300 NNTP-Posting-Host: 207.253.161.92 X-Complaints-To: abuse AT videotron DOT net X-Trace: wagner.videotron.net 925787881 207.253.161.92 (Mon, 03 May 1999 23:18:01 EDT) NNTP-Posting-Date: Mon, 03 May 1999 23:18:01 EDT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Hi, I need to set-up a map like : int sx=100,sy=100; char map[sx][sx]; I know I can use : char (*map)[sx]=new[sx][sy]; But i want to change this array size anytime in the game. So I must delete []map; then remake the array. Do it be better to do this using malloc and realloc ? how can I set up a 2 and a 3 dimentional array using malloc ? and how I resize it with realloc ? then how can I get access to it ? please help