Can I use the "new" C++ memory features?


sometimes compiler seems c++, , other times c. knows "class" , doesn't seem care variables declared (like c++), when try allocate memory dynamically:

  char *stuff = new char[10] ;

it gives me compiler error seems suggest isn't compiling c++, though file extension cpp.

is there way turn on 'new', or need allocate memory old fashioned way?

thanks!
mark

arduino use c++ avr-gcc compiler used has restrictions related use on embedded platform.

new , delete not supported last time looked @ compiler spec, malloc , free can make own if want, see thread: http://www.arduino.cc/cgi-bin/yabb2/yabb.pl?num=1230935955

with few k of ram careful allocating dynamic memory - easy run out.

have fun!


Arduino Forum > Forum 2005-2010 (read only) > Software > Syntax & Programs > Can I use the "new" C++ memory features?


arduino

Comments

Popular posts from this blog

CAN'T INSTALL MAMBELFISH 1.5 FROM DIRECTORY - Joomla! Forum - community, help and support

error: expected initializer before 'void'

CPU load monitoring using GPIO and leds - Raspberry Pi Forums