View Full Version : Conversion to hexadecimal
vidya.p
13th December 2011, 08:17
How to show the conversion of 1387977189696842278 to 134315e67439aa26 using C++?
Lykurg
13th December 2011, 09:00
Well, a quick lookup in the docs could have solved your problem...
quint64 i = 1387977189696842278;
QString str = QString("Decimal %1 is %2 in hexadecimal")
.arg(i)
.arg(i, 0, 16);
qWarning() << str;
myta212
13th December 2011, 09:29
Hi,
If you want use Qt, you can use above code.
In C++ you must use library can handle big data like biginteger(https://mattmccutchen.net/bigint/) or gmp(http://gmplib.org/).
So, you can convert your number to HEX with this tutorial link http://www.permadi.com/tutorial/numDecToHex/
THank you for your attention.
Best regards,
Toto
vidya.p
13th December 2011, 10:25
thanks for the help.
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.