QString uuid;
uuid.sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x',
this->mt_rand(0, 0xffff),
this->mt_rand(0, 0xffff),
this->mt_rand(0, 0xffff),
this->mt_rand(0, 0x0fff) | 0x4000,
this->mt_rand(0, 0x3fff) | 0x8000,
this->mt_rand(0, 0xffff),
this->mt_rand(0, 0xffff),
this->mt_rand(0, 0xffff));
return uuid;
mt_rand возвращает quint64
Возникает ошибка:
/home/neochapay/work/code.cpp:64: ошибка: invalid conversion from 'int' to 'const char*' [-fpermissive]
this->mt_rand(0, 0xffff));
^