problem with 64bit integer 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
liuqi5521
Earned some good credits
Earned some good credits
Posts: 103
Joined: Thu Apr 03, 2008 5:35 am
Location: China
Contact:

problem with 64bit integer

Post by liuqi5521 » Fri Aug 15, 2008 9:42 am

I want to show a 64bit integer as follows:

Code: Select all

unsigned long long ull=0x7fffffffffffffffULL; 
s=wxString::Format("%llu",ull); 
MessageBox(0,s,s,MB_OK); 
But, the result of this code is 4GB,Anybody who can tell me the reason?

User avatar
doublemax
Moderator
Moderator
Posts: 14305
Joined: Fri Apr 21, 2006 8:03 pm
Location: $FCE2

Post by doublemax » Fri Aug 15, 2008 10:35 am

Use the source, Luke!

framepointer
Super wx Problem Solver
Super wx Problem Solver
Posts: 264
Joined: Mon Aug 07, 2006 3:25 pm
Location: Baia Mare, Romania
Contact:

Post by framepointer » Fri Aug 15, 2008 3:06 pm

Under Windows %llu does not work. You might try %Lu or something similar.

Regards
Software is like sex,
It's better when it's free.
~Linus Torvalds

Post Reply