[Qt-interest] OT: std::cout , output number as char type ?
Donal O'Connor
donaloconnor at gmail.com
Mon Aug 23 11:19:27 CEST 2010
Try QString::number...
http://doc.qt.nokia.com/4.6/qstring.html#number
On Mon, Aug 23, 2010 at 10:15 AM, Aaron Lewis <aaron.lewis1989 at gmail.com>wrote:
> Hi,
> How can i output a number as a character with std::cout , anyone
> knows ?
>
> This:
>
> std::cout << 'a' + 5 << std::endl;
>
> Will output a number , if i don't want to use printf() like function
> ,
> how could i archive it ? ( Maybe with <iomanip> )
>
> I've been googled around for a long time , nothing useful.
>
>
> Thanks a lot !
>
> --
> Best Regards,
> Aaron Lewis - PGP: 0x4A6D32A0
> FingerPrint EA63 26B2 6C52 72EA A4A5 EB6B BDFE 35B0 4A6D 32A0
> irc: A4R0NL3WI5 on freenode
> _______________________________________________
> Qt-interest mailing list
> Qt-interest at trolltech.com
> http://lists.trolltech.com/mailman/listinfo/qt-interest
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.qt-project.org/pipermail/qt-interest-old/attachments/20100823/c2f3b465/attachment.html
More information about the Qt-interest-old
mailing list