Click here to Skip to main content
15,867,453 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionCalculating Age in days Pin
Charles Covington18-Feb-07 14:50
Charles Covington18-Feb-07 14:50 
AnswerRe: Calculating Age in days Pin
Christian Graus18-Feb-07 15:18
protectorChristian Graus18-Feb-07 15:18 
AnswerRe: Calculating Age in days Pin
Waldermort18-Feb-07 15:37
Waldermort18-Feb-07 15:37 
AnswerRe: Calculating Age in days Pin
David Crow18-Feb-07 16:24
David Crow18-Feb-07 16:24 
AnswerRe: Calculating Age in days Pin
#realJSOP19-Feb-07 0:17
mve#realJSOP19-Feb-07 0:17 
AnswerRe: Calculating Age in days Pin
Charles Covington19-Feb-07 5:44
Charles Covington19-Feb-07 5:44 
AnswerRe: Calculating Age in days Pin
cmk20-Feb-07 8:02
cmk20-Feb-07 8:02 
QuestionBetter HEX to INT conversion Pin
Llasus18-Feb-07 14:33
Llasus18-Feb-07 14:33 
Good day to you all! I have a program where a CSTRING contains a string of hex value then turn it to INT. The way I convert basically is to use a for loop and convert each char one-by-one till I get the result. Now, this for me is a problem since I am doing a char per char conversion which takes long to process especially when I am having a huge hex value. I would like to know if there is a better way of doing a hex to int conversion.

for(nindex = 0;nindex < nlength; nindex++)<br />
{<br />
   ctemp = buffstrdata.GetAt(nindex);<br />
   ntemp = GetIntValue(ctemp); //a function that brings back the int equivalent of the hex<br />
   result = result + (int)pow(16, nlength - 1 - nindex) * ntemp;<br />
}


Thanks a lot for the time and help!
AnswerRe: Better HEX to INT conversion Pin
Chris Losinger18-Feb-07 15:26
professionalChris Losinger18-Feb-07 15:26 
GeneralRe: Better HEX to INT conversion Pin
Llasus18-Feb-07 15:56
Llasus18-Feb-07 15:56 
QuestionWallpaper changer in MFC Pin
kubapl1818-Feb-07 9:07
kubapl1818-Feb-07 9:07 
AnswerRe: Wallpaper changer in MFC Pin
Mark Salsbery18-Feb-07 10:01
Mark Salsbery18-Feb-07 10:01 
AnswerRe: Wallpaper changer in MFC Pin
Rick York18-Feb-07 11:32
mveRick York18-Feb-07 11:32 
QuestionProblem with SetRect Pin
CoffeeAddict1918-Feb-07 8:45
CoffeeAddict1918-Feb-07 8:45 
AnswerRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 8:58
Mark Salsbery18-Feb-07 8:58 
GeneralRe: Problem with SetRect Pin
CoffeeAddict1918-Feb-07 9:11
CoffeeAddict1918-Feb-07 9:11 
GeneralRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 9:22
Mark Salsbery18-Feb-07 9:22 
GeneralRe: Problem with SetRect Pin
CoffeeAddict1918-Feb-07 9:38
CoffeeAddict1918-Feb-07 9:38 
GeneralRe: Problem with SetRect Pin
Mark Salsbery18-Feb-07 9:44
Mark Salsbery18-Feb-07 9:44 
QuestionVirtual Midi Output Port... Pin
aquawicket18-Feb-07 3:54
aquawicket18-Feb-07 3:54 
GeneralVC++ linker error Pin
Member 384040618-Feb-07 3:42
Member 384040618-Feb-07 3:42 
GeneralRe: VC++ linker error Pin
Waldermort18-Feb-07 3:47
Waldermort18-Feb-07 3:47 
GeneralRe: VC++ linker error Pin
Hamid_RT18-Feb-07 6:25
Hamid_RT18-Feb-07 6:25 
GeneralRe: VC++ linker error Pin
Hamid_RT18-Feb-07 4:55
Hamid_RT18-Feb-07 4:55 
GeneralRe: VC++ linker error Pin
Jeffrey Walton18-Feb-07 5:44
Jeffrey Walton18-Feb-07 5:44 

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.