[Qt-interest] QByteArray containing numbers bigger than 127
Patric
userqt at gmail.com
Fri Jun 5 21:46:00 CEST 2009
Hi all.
I have QByteArray here with numbers. One of the number is bigger than 127, and it seems I can't correctly extract it...
My number si 200, but it's extracted as -56.
For example :
QByteArray array;
array.append(200);
int test = array.at(0);
// test - -56
I think that is because at() returns char...
but isn't that stupid ? After all, it's QByteArray, not QCharArray. It should return int, not char.
Patric
__________ Information from ESET NOD32 Antivirus, version of virus signature database 4098 (20090522) __________
The message was checked by ESET NOD32 Antivirus.
http://www.eset.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20090605/86f4fe20/attachment.html
More information about the Qt-interest-old
mailing list