Click here to Skip to main content
16,012,223 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: How to get yesterdays day using MFC Classes like CTime,COleDateTIme Pin
PJ Arends31-Aug-03 21:26
professionalPJ Arends31-Aug-03 21:26 
GeneralRe: How to get yesterdays day using MFC Classes like CTime,COleDateTIme Pin
sarathymail1-Sep-03 1:46
sarathymail1-Sep-03 1:46 
AnswerRe: How to get yesterdays day using MFC Classes like CTime,COleDateTIme Pin
YaronNir1-Sep-03 1:15
YaronNir1-Sep-03 1:15 
Questionhow to add tab control to tree view? Pin
ben231-Aug-03 19:19
ben231-Aug-03 19:19 
AnswerRe: how to add tab control to tree view? Pin
ben231-Aug-03 19:57
ben231-Aug-03 19:57 
Generaloptimizd C code Pin
devvvy31-Aug-03 18:57
devvvy31-Aug-03 18:57 
GeneralRe: optimizd C code Pin
Michael Dunn31-Aug-03 19:27
sitebuilderMichael Dunn31-Aug-03 19:27 
GeneralRe: optimizd C code Pin
Joaquín M López Muñoz1-Sep-03 3:13
Joaquín M López Muñoz1-Sep-03 3:13 
Just adding to Michael's answer, the compiler is most likely to do this kind of replacing itself (it is smart enough to know that multiplying by 16 is equivalent to shifting), so your speed gain is most probably 0. To outsmart the compiler in this type of expressions, you should be knowing something that the compiler cannot possibly find out. For instance, suppose you've got an expression like:
sum+=j*i+1;
and you know that i is always a power of 2. Then you can actually have some speedup by replacing i with its log2 in the code and doing the shifting.

Joaquín M López Muñoz
Telefónica, Investigación y Desarrollo
GeneralRe: optimizd C code Pin
devvvy1-Sep-03 6:28
devvvy1-Sep-03 6:28 
GeneralRe: optimizd C code Pin
Gary R. Wheeler1-Sep-03 4:46
Gary R. Wheeler1-Sep-03 4:46 
GeneralLaunching program from resources Pin
Ricky Koh31-Aug-03 18:57
Ricky Koh31-Aug-03 18:57 
Generalsampling another apps pixels Pin
7stud31-Aug-03 17:56
7stud31-Aug-03 17:56 
Generalmillisecond time Pin
devvvy31-Aug-03 16:57
devvvy31-Aug-03 16:57 
GeneralRe: millisecond time Pin
PJ Arends31-Aug-03 18:03
professionalPJ Arends31-Aug-03 18:03 
GeneralRe: millisecond time Pin
DougW4831-Aug-03 18:31
DougW4831-Aug-03 18:31 
GeneralRe: millisecond time Pin
Gary R. Wheeler1-Sep-03 4:52
Gary R. Wheeler1-Sep-03 4:52 
GeneralRe: millisecond time Pin
devvvy1-Sep-03 6:40
devvvy1-Sep-03 6:40 
QuestionHow to program just like winamp to make multi dialog attach to each other? Pin
allenhu31-Aug-03 15:18
allenhu31-Aug-03 15:18 
AnswerRe: How to program just like winamp to make multi dialog attach to each other? Pin
devvvy1-Sep-03 6:39
devvvy1-Sep-03 6:39 
Generalrecvfrom returns SOCKET_ERROR but WSAGetLastError returns 0 Pin
CND31-Aug-03 12:32
CND31-Aug-03 12:32 
QuestionAny way to view the contents of an ms word file? Pin
DanYELL31-Aug-03 12:26
DanYELL31-Aug-03 12:26 
AnswerRe: Any way to view the contents of an ms word file? Pin
Joey Bloggs31-Aug-03 14:18
Joey Bloggs31-Aug-03 14:18 
AnswerRe: Any way to view the contents of an ms word file? Pin
tareqsiraj1-Sep-03 4:53
tareqsiraj1-Sep-03 4:53 
QuestionHow to use tab in a treeview? Pin
Binayak31-Aug-03 12:21
Binayak31-Aug-03 12:21 
AnswerRe: How to use tab in a treeview? Pin
Joey Bloggs31-Aug-03 14:48
Joey Bloggs31-Aug-03 14:48 

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.