🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: cs.questions
Article #1

Dynamic Multidimensional Array Allocation in C++

#1
From: Tommy Kelly
Date: Mon, 04 Jan 1993 15:41
11 lines
671 bytes
How do I implement a dynamically configurable two dimensional array in C++?

For one dimension its easy, but doing:

my_type *my_type_var = new my_type[a][b];

doesn't seem to work.

thanks for any help.

tk
Technical Details
Message-ID: <C0C68I.MA7@dcs.ed.ac.uk>
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!uknet!edcastle!dcs.ed.ac.uk!tk

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!pipex!bnr.co.uk!uknet!edcastle!dcs.ed.ac.uk!tk
From: tk@dcs.ed.ac.uk (Tommy Kelly)
Newsgroups: cs.questions,comp.lang.c++
Subject: Dynamic Multidimensional Array Allocation in C++
Message-ID: <C0C68I.MA7@dcs.ed.ac.uk>
Date: 4 Jan 93 15:41:06 GMT
Sender: cnews@dcs.ed.ac.uk (UseNet News Admin)
Reply-To: tk@dcs.ed.ac.uk (Tommy Kelly)
Organization: Laboratory for the Foundations of Computer Science, Edinburgh U
Lines: 11