Hello.

I want to convert from QString to char[sizeof(...)] and vice versa. I was checking some threads in the forum but I can convert to char* and not to char[sizeof(..)], I know is almost the same but when I write the following code:

QString string;
char msg[sizeof(SIZE)];
QByteArray ba = string.toLatin1();

const char *c_str2 = ba.data();
msg=(char*)c_str2;

I obtain this error: incompatible types in assignment of `char*' to `char[2]'

I can imagine that it is something basic but I dont know how to do it.

P.d. I need use [sizeof(..)] to assign a determinate memory space.
P.d. I was checking this thread to check how convet a QString to char* http://www.qtsoftware.com/developer/...30.9032238253/

Thank you.