Hi all,

I want to use a dynamic buffer in one of my application. I'll explain it in this way. Depend on one of my calculation I found a number(int value), and I want to define a buffer size to that value. Then after doing all the required process need to clear that buffer size and define it to the next calculated size. Simply it is looping.

So how can I do it.


Look up new and free .

Like this

char * dataBuffer = NULL ;
dataBuffer = new char[dynamic_buffer_size] ;
// work on with buffer
delete [] buffer;

Look up new and free .

Sorry. new and delete .