From kde-core-devel Mon Aug 20 13:45:55 2007 From: Mosfet Date: Mon, 20 Aug 2007 13:45:55 +0000 To: kde-core-devel Subject: C++ Template Question Message-Id: <200708200845.55166.daniel.duley () verizon ! net> X-MARC-Message: https://marc.info/?l=kde-core-devel&m=118763832104767 Woebbeking over on kde-commits pointed out to me this little gem, QVarLengthArray: http://doc.trolltech.com/4.3/qvarlengtharray.html Looks like a nice alternative to new as it allocates data on the stack, not the heap, so should be quick and you don't have to worry about delete. The only question I have about it is if it is possible to use this to create a multidimensional array and if so what is the proper way? I'm not a template expert so don't know. I could of course just allocate one block and use offsets but I like using indexes if possible :)