Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <QTextStream>
- #include <QDebug>
- int main()
- {
- QTextStream ts("faa"); // works with "0xfaa"
- ts.setNumberFlags(ts.numberFlags() & ~QTextStream::ShowBase);
- ts.setIntegerBase(16);
- int a;
- ts >> a;
- qDebug() << a; // outputs 0
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement