Hi!

I have the following struct:
Code:
struct cBuffer
{
 char data[1024];
 int bytesRecorded;
 bool flag;
 cBuffer(char * data_, int bytesRecorded_, bool flag_) :
 bytesRecorded(bytesRecorded_), flag(flag_)
 {
  memcpy(static_cast<void *>(data), static_cast<void *>(data_), 
bytesRecorded * sizeof(char));
 }
};
I would like to turn char data[1024] to const char data[1024], the same goes
for the constructor:
cBuffer(const char * data_, int bytesRecorded_, bool flag_)
But then I fail using the memcpy() function because of the wrong cast.

how could I sort that out?

thanks