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 


C++ dec in hex(no converting, need the same numbers in hex)

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General programming
View previous topic :: View next topic  
Author Message
redhead
Cheater
Reputation: 0

Joined: 21 Mar 2007
Posts: 47

PostPosted: Tue Sep 30, 2008 9:17 am    Post subject: C++ dec in hex(no converting, need the same numbers in hex) Reply with quote

Here was a dumb question, please ignore.
Back to top
View user's profile Send private message
&Vage
Grandmaster Cheater Supreme
Reputation: 0

Joined: 25 Jul 2008
Posts: 1053

PostPosted: Tue Sep 30, 2008 7:15 pm    Post subject: Reply with quote

DWORD lolwat;

sprintf(lolwat, "%X08", 9048093);


Not possible without conversion...
Back to top
View user's profile Send private message
GMZorita
Grandmaster Cheater Supreme
Reputation: 0

Joined: 21 Mar 2007
Posts: 1361

PostPosted: Tue Sep 30, 2008 7:18 pm    Post subject: Re: C++ dec in hex(no converting, need the same numbers in h Reply with quote

redhead wrote:
Here was a dumb question, please ignore.

You mean like a string?
String num = 7A;
num = "0x"+num;
Because the title looks like.
same number in hex?
either you want
10 = 0x10
or 10 = 0xC


Depends on the usage, you wan't to output it?
Use IntToHex((int)IntGoesHere,8);
Eg. IntToHex((int)485025,8); returns = "000766A1"

_________________
Gone
Back to top
View user's profile Send private message
Noz3001
I'm a spammer
Reputation: 26

Joined: 29 May 2006
Posts: 6220
Location: /dev/null

PostPosted: Wed Oct 01, 2008 3:54 am    Post subject: Reply with quote

Code:
std::cout << std::hex << 69;


Mr. Green
Back to top
View user's profile Send private message MSN Messenger
redhead
Cheater
Reputation: 0

Joined: 21 Mar 2007
Posts: 47

PostPosted: Wed Oct 01, 2008 6:33 am    Post subject: Re: C++ dec in hex(no converting, need the same numbers in h Reply with quote

GMZorita wrote:
redhead wrote:
Here was a dumb question, please ignore.

You mean like a string?
String num = 7A;
num = "0x"+num;
Because the title looks like.
same number in hex?
either you want
10 = 0x10
or 10 = 0xC


Depends on the usage, you wan't to output it?
Use IntToHex((int)IntGoesHere,Cool;
Eg. IntToHex((int)485025,Cool; returns = "000766A1"


I wanted 10 = 0x10 (or 10 = 16).
But it doesn't matter anymore, I found some mistakes on my calculating and I don't need that anymore.^^
Thx anyway
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