We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I want to allocate memory which I can use as a two dimensional array. But the following code is not working
unsigned char xdata ** memo; unsigned char i = 0; // n is number of rows // size is number of columns memo = (unsigned char xdata **) malloc( n*2 ); for ( ; i < size; i++) memo[i] = (unsigned char xdata *)malloc( size );
memo = new char * [n]; for (int i=0; i < n; i++) memo[i*2] = new char [size];
Thanks a lot Jon, it really helped me...