Click here to Skip to main content
15,910,303 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: hexadecimal to decimal-newbie Pin
Nibu babu thomas27-Apr-06 21:55
Nibu babu thomas27-Apr-06 21:55 
AnswerRe: hexadecimal to decimal-newbie Pin
Nishad S27-Apr-06 22:26
Nishad S27-Apr-06 22:26 
GeneralRe: hexadecimal to decimal-newbie Pin
antonaras_marcou27-Apr-06 22:36
antonaras_marcou27-Apr-06 22:36 
GeneralRe: hexadecimal to decimal-newbie Pin
Nishad S27-Apr-06 22:54
Nishad S27-Apr-06 22:54 
GeneralRe: hexadecimal to decimal-newbie Pin
Aryan S27-Apr-06 23:20
Aryan S27-Apr-06 23:20 
GeneralRe: hexadecimal to decimal-newbie Pin
Nishad S27-Apr-06 23:49
Nishad S27-Apr-06 23:49 
QuestionRe: hexadecimal to decimal-newbie Pin
Aryan S28-Apr-06 0:16
Aryan S28-Apr-06 0:16 
AnswerRe: hexadecimal to decimal-newbie Pin
Nishad S28-Apr-06 0:29
Nishad S28-Apr-06 0:29 
"%x" is used to read a hexadecimal number from a string to an integer variable.
In your code your are trying to read it to char array, not to an int or long.
If you want to show the read number then try like this:
char str[100]="ff";
char newstr[100];
int num;
sscanf(str, "%x", &num);
sprintf(newstr,"decimal = %d",num);
AfxMessageBox(newstr);

It will display 255.
Smile | :)

- NS -
GeneralRe: hexadecimal to decimal-newbie Pin
Aryan S28-Apr-06 0:35
Aryan S28-Apr-06 0:35 
AnswerRe: hexadecimal to decimal-newbie Pin
Roger Stoltz28-Apr-06 2:30
Roger Stoltz28-Apr-06 2:30 
AnswerRe: hexadecimal to decimal-newbie Pin
David Crow28-Apr-06 2:32
David Crow28-Apr-06 2:32 
QuestionGraph Control in MFC Pin
QuickDeveloper27-Apr-06 21:28
QuickDeveloper27-Apr-06 21:28 
QuestionMDI Child Window + top most Pin
Sarvan AL27-Apr-06 21:14
Sarvan AL27-Apr-06 21:14 
AnswerRe: MDI Child Window + top most Pin
Nibu babu thomas27-Apr-06 21:15
Nibu babu thomas27-Apr-06 21:15 
GeneralRe: MDI Child Window + top most Pin
Sarvan AL27-Apr-06 21:35
Sarvan AL27-Apr-06 21:35 
GeneralRe: MDI Child Window + top most Pin
Nibu babu thomas27-Apr-06 21:39
Nibu babu thomas27-Apr-06 21:39 
GeneralRe: MDI Child Window + top most Pin
Sarvan AL27-Apr-06 21:47
Sarvan AL27-Apr-06 21:47 
GeneralRe: MDI Child Window + top most Pin
Nibu babu thomas27-Apr-06 21:51
Nibu babu thomas27-Apr-06 21:51 
GeneralRe: MDI Child Window + top most Pin
Sarvan AL27-Apr-06 22:36
Sarvan AL27-Apr-06 22:36 
GeneralRe: MDI Child Window + top most Pin
Russell'27-Apr-06 23:39
Russell'27-Apr-06 23:39 
GeneralMDI child as MODELESS DIALOG Pin
Sarvan AL28-Apr-06 0:23
Sarvan AL28-Apr-06 0:23 
QuestionTo get the path for Program files Pin
Aryan S27-Apr-06 20:51
Aryan S27-Apr-06 20:51 
AnswerRe: To get the path for Program files Pin
Stephen Hewitt27-Apr-06 21:11
Stephen Hewitt27-Apr-06 21:11 
AnswerRe: To get the path for Program files Pin
Justin Tay27-Apr-06 21:12
Justin Tay27-Apr-06 21:12 
QuestionModify Event Loop in MFC-based app for TWAIN Pin
ilidan27-Apr-06 20:39
ilidan27-Apr-06 20:39 

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.