Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


MS C-compiler: printf and 8 byte hex

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
Dark Byte
Site Admin
Reputation: 474

Joined: 09 May 2003
Posts: 25952
Location: The netherlands

PostPosted: Mon Jan 23, 2012 7:02 am    Post subject: MS C-compiler: printf and 8 byte hex Reply with quote

I have an 8 byte variable(UINT64) whose bytes exist out of "3b 00 01 80 ff ff ff ff "
How do I use printf to display ffffffff8001003b (%llx and %016llX do not work)

Edit: found it: %I64x

_________________
Tools give you results. Knowledge gives you control.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
Jani
Grandmaster Cheater
Reputation: 2

Joined: 29 Dec 2006
Posts: 804

PostPosted: Wed Jan 25, 2012 4:53 am    Post subject: Reply with quote

In case someone accidentally wanders here in the future..

As I told Dark Byte on IRC it's preferable to use %PRIx64 from inttypes.h header if it's available on your compiler (C99?), because displaying 64-bit integers is non-standard. On gcc it expands to %llx and on MSVC to %I64x. But in his case, inttypes wasn't available.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites