how to I convert a "unsigned long long" to a wxStr Topic is solved

If you are using the main C++ distribution of wxWidgets, Feel free to ask any question related to wxWidgets development here. This means questions regarding to C++ and wxWidgets, not compile problems.
Post Reply
cavolaccimiei
Knows some wx things
Knows some wx things
Posts: 41
Joined: Thu Feb 08, 2007 10:48 am

how to I convert a "unsigned long long" to a wxStr

Post by cavolaccimiei » Thu Jul 05, 2007 3:48 pm

How to I convert a "unsigned long long" number to a wxString?

tan
Moderator
Moderator
Posts: 1471
Joined: Tue Nov 14, 2006 7:58 am
Location: Saint-Petersburg, Russia

Post by tan » Thu Jul 05, 2007 4:02 pm

wxString wxULongLong::ToString()
OS: Windows XP Pro
Compiler: MSVC++ 7.1
wxWidgets: 2.8.10

krzysiek_t
Earned a small fee
Earned a small fee
Posts: 23
Joined: Tue Jul 11, 2006 1:36 pm
Location: Poland, Warsaw
Contact:

Re: how to I convert a "unsigned long long" to a w

Post by krzysiek_t » Fri Jul 06, 2007 12:51 pm

Something like this should work:

Code: Select all

long long x = 1234;
wxLongLong y = x;
wxString str = y.toString();
cavolaccimiei wrote:How to I convert a "unsigned long long" number to a wxString?
[/code]

User avatar
tierra
Site Admin
Site Admin
Posts: 1343
Joined: Sun Aug 29, 2004 7:14 pm
Location: Salt Lake City, Utah, USA
Contact:

Post by tierra » Fri Jul 06, 2007 4:23 pm

You could also likely use wxString::Format() or wxString::Printf().

Post Reply