[rescue] Cooling (Long Message, sorry)

Scott Newell newell at cei.net
Thu Apr 18 08:47:50 CDT 2002


>How are you supposed to make variable sized float[][]s? 

new or malloc(), just like with variable sized single dimension arrays!


>Besides, how is new float[x][y] going to screw things up?  They had to have
>some reason for making it a legal operation.

You can allocate an array on the stack if the dimensions are constants
(known at compile time).  Otherwise, you need to allocate off the heap
using malloc() or new.


http://www.eskimo.com/~scs/cclass/int/sx9b.html

http://www.eskimo.com/~scs/C-faq/questions.html


newell



More information about the rescue mailing list