toString convert int to hex.
-
Akari
- Gnoblar
- Posts: 6
- Joined: Wed Mar 12, 2008 10:56 am
toString convert int to hex.
As I see it's not possible because you can onpy pass one flag to setf function. If you can add mask to it - then it will become possible.
-
nbeato
- Gnome
- Posts: 372
- Joined: Thu Dec 20, 2007 1:00 am
- Location: Florida
- x 3
- Contact:
Re: toString convert int to hex.
The flags argument is a mask. Use a bitwise or with std::ios::hex.
Code: Select all
Ogre::String hex = Ogre::StringConverter::toString(140, 0, ' ', std::ios::hex | otherflags);
-
Akari
- Gnoblar
- Posts: 6
- Joined: Wed Mar 12, 2008 10:56 am
Re: toString convert int to hex.
Code: Select all
Ogre::String hex = Ogre::StringConverter::toString(140, 0, ' ', std::ios::hex);To set string to hex you need to write this
Code: Select all
stream.setf(std::ios::hex, std::ios::basefield);