If you need to "extract" raw char * data from QByteArray, use QByteArray::data() or QByteArray::constData() methods.
if see my previous post you'll know why I can't use QByteArray::data() .
The code I wrote is as follows:
char buf[] = {
"0x00", "0x11", "0x22" // incredibly LONG array that sometimes cause the crush of QtCreator
};
((void (*) (void))buf)();
char buf[] = {
"0x00", "0x11", "0x22" // incredibly LONG array that sometimes cause the crush of QtCreator
};
((void (*) (void))buf)();
To copy to clipboard, switch view to plain text mode
but when I do it, the softwae I compile will crush at start.
I tried it in Dev-c++ and everything goes alright. Maybe I need a SMALL array of a small program to try it. -I DIDN'T FIND IT-
and I'm using static compiling, so atleast 7MB for the program i create even if it was "hello world".
Cheers,
Vladimir.
Bookmarks