Hello
Why I cant allocate new array ?
I succeded to create static array:
int tmp[4];
but I can't create dynamic array:
int[] tmp = new int[43];
(for example)
whats he problem ?
thanks. (and sorry for my bad english ;))
Hello
Why I cant allocate new array ?
I succeded to create static array:
int tmp[4];
but I can't create dynamic array:
int[] tmp = new int[43];
(for example)
whats he problem ?
thanks. (and sorry for my bad english ;))
halley gave a good answer to this question here: http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1230935955/3#3
It usually best to avoid dynamic allocation on platforms like the arduino with limited memory. Static allocation is more efficient and it can be hard to debug code that only runs out of memory after a few hours or days.