Click here to Skip to main content
15,921,837 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to convert string to hex Pin
FlyingDancer2-Jun-03 20:43
FlyingDancer2-Jun-03 20:43 
AnswerRe: How to convert string to hex Pin
Dominik Reichl2-Jun-03 20:48
Dominik Reichl2-Jun-03 20:48 
GeneralRe: How to convert string to hex Pin
FlyingDancer2-Jun-03 20:59
FlyingDancer2-Jun-03 20:59 
GeneralRe: How to convert string to hex Pin
Dominik Reichl2-Jun-03 21:14
Dominik Reichl2-Jun-03 21:14 
GeneralRe: How to convert string to hex Pin
FlyingDancer3-Jun-03 14:23
FlyingDancer3-Jun-03 14:23 
GeneralRe: How to convert string to hex Pin
Dominik Reichl3-Jun-03 21:27
Dominik Reichl3-Jun-03 21:27 
GeneralRe: How to convert string to hex Pin
FlyingDancer3-Jun-03 22:22
FlyingDancer3-Jun-03 22:22 
GeneralRe: How to convert string to hex Pin
Dominik Reichl3-Jun-03 22:32
Dominik Reichl3-Jun-03 22:32 
Well! BUT you use a const char * cast to get the char* from the CString. My solution with GetBuffer/ReleaseBuffer is safer.

If I would do it with a cast like you my solution would be:

strText = m_lstWrite.GetItemText(i,j+1); // Get the CString: strText 
temp = strtoul((const char*)(strText),NULL,16); // Convert
Only one line of conversation code then too! Big Grin | :-D

Beer | [beer]
-Dominik



_outp(0x64, 0xAD);
and
__asm mov al, 0xAD __asm out 0x64, al
do the same... but what do they do?? Wink | ;)

GeneralRe: How to convert string to hex Pin
FlyingDancer3-Jun-03 23:06
FlyingDancer3-Jun-03 23:06 
GeneralRe: How to convert string to hex Pin
Peter Weyzen3-Jun-03 7:56
Peter Weyzen3-Jun-03 7:56 
GeneralRe: How to convert string to hex Pin
FlyingDancer3-Jun-03 14:18
FlyingDancer3-Jun-03 14:18 
GeneralRe: How to convert string to hex Pin
Dominik Reichl3-Jun-03 21:26
Dominik Reichl3-Jun-03 21:26 
GeneralRe: How to convert string to hex Pin
FlyingDancer3-Jun-03 22:32
FlyingDancer3-Jun-03 22:32 
GeneralRe: How to convert string to hex Pin
Dominik Reichl3-Jun-03 22:39
Dominik Reichl3-Jun-03 22:39 
AnswerRe: How to convert string to hex Pin
Joaquín M López Muñoz2-Jun-03 21:04
Joaquín M López Muñoz2-Jun-03 21:04 
GeneralRe: How to convert string to hex Pin
FlyingDancer2-Jun-03 21:39
FlyingDancer2-Jun-03 21:39 
QuestionIs it possible to create a world inside C++? Pin
keeper_sakeris2-Jun-03 16:26
keeper_sakeris2-Jun-03 16:26 
AnswerRe: Is it possible to create a world inside C++? Pin
paulb2-Jun-03 20:09
paulb2-Jun-03 20:09 
GeneralRe: Is it possible to create a world inside C++? Pin
Anna-Jayne Metcalfe3-Jun-03 0:47
Anna-Jayne Metcalfe3-Jun-03 0:47 
AnswerRe: Is it possible to create a world inside C++? Pin
Dominik Reichl2-Jun-03 20:44
Dominik Reichl2-Jun-03 20:44 
AnswerRe: Is it possible to create a world inside C++? Pin
Michael Pauli2-Jun-03 23:49
Michael Pauli2-Jun-03 23:49 
GeneralRe: Is it possible to create a world inside C++? Pin
Dominik Reichl3-Jun-03 0:43
Dominik Reichl3-Jun-03 0:43 
AnswerRe: Is it possible to create a world inside C++? Pin
Michael Andrew3-Jun-03 0:53
Michael Andrew3-Jun-03 0:53 
GeneralRe: Is it possible to create a world inside C++? Pin
keeper_sakeris3-Jun-03 6:05
keeper_sakeris3-Jun-03 6:05 
GeneralRe: Is it possible to create a world inside C++? Pin
basementman9-Jun-03 6:36
basementman9-Jun-03 6:36 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.