You can't allocate an array dynamically. All arrays must be statically allocated using constant sizes defined at compile time.
Kevin On 9/13/07, Islam Hegazy <[EMAIL PROTECTED]> wrote: > > > Hi all > > I want to use a dynamic array in my sensor application. Is there a way to > iniailize the array before using it like the keyword new in C++? > > I defined the array as : uint16_t *dataArr > when I access it as : dataArr[numData++] = value > it gives a runtime error. > > I am working with mica2 and TinyOS1. > > Regards > Islam Hegazy > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- ~Kevin _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
