Click here to Skip to main content
15,885,278 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: what's the point? do{...}while(FALSE); Pin
CPallini8-Feb-08 10:34
mveCPallini8-Feb-08 10:34 
GeneralRe: what's the point? do{...}while(FALSE); Pin
BadKarma8-Feb-08 23:45
BadKarma8-Feb-08 23:45 
GeneralRe: what's the point? do{...}while(FALSE); Pin
Stephen Hewitt9-Feb-08 2:44
Stephen Hewitt9-Feb-08 2:44 
GeneralRe: what's the point? do{...}while(FALSE); Pin
CPallini9-Feb-08 3:36
mveCPallini9-Feb-08 3:36 
GeneralRe: what's the point? do{...}while(FALSE); Pin
Waldermort8-Feb-08 8:49
Waldermort8-Feb-08 8:49 
GeneralRe: what's the point? do{...}while(FALSE); Pin
led mike8-Feb-08 9:35
led mike8-Feb-08 9:35 
GeneralRe: what's the point? do{...}while(FALSE); Pin
Nemanja Trifunovic8-Feb-08 10:06
Nemanja Trifunovic8-Feb-08 10:06 
GeneralCalc can, but my code can't Pin
Waldermort8-Feb-08 7:30
Waldermort8-Feb-08 7:30 
After a user click, I am pulling a value from a control, converting this into a decimal value and relaying it to another control. The theory is correct, but I just cannot get my code to produce the correct value. This is the formula:

double dZoomFactor = 1 / ( 1 << ( 16 - dwId ) );

where dwId is an integer value between 1 and 16;

In theory:
dZoomFactor = 1 / ( 1 << ( 16 - 1 ) );<br />
dZoomFactor = 1 / ( 1 << 15 );<br />
dZoomFactor = 1 / 32768;<br />
dZoomFactor = 0.000030517578125;


But, the output is always a flat '0.0'. What am I missing?

Waldermort

GeneralRe: Calc can, but my code can't Pin
led mike8-Feb-08 8:05
led mike8-Feb-08 8:05 
GeneralRe: Calc can, but my code can't Pin
Waldermort8-Feb-08 8:09
Waldermort8-Feb-08 8:09 
GeneralRe: Calc can, but my code can't Pin
CPallini8-Feb-08 8:14
mveCPallini8-Feb-08 8:14 
GeneralRe: Calc can, but my code can't Pin
Waldermort8-Feb-08 8:19
Waldermort8-Feb-08 8:19 
GeneralRe: Calc can, but my code can't Pin
led mike8-Feb-08 8:28
led mike8-Feb-08 8:28 
GeneralRe: Calc can, but my code can't Pin
Waldermort8-Feb-08 8:34
Waldermort8-Feb-08 8:34 
GeneralRe: Calc can, but my code can't Pin
David Crow8-Feb-08 8:26
David Crow8-Feb-08 8:26 
GeneralRe: Calc can, but my code can't Pin
Waldermort8-Feb-08 8:30
Waldermort8-Feb-08 8:30 
GeneralC++ library supported DLL Pin
George_George8-Feb-08 5:50
George_George8-Feb-08 5:50 
GeneralRe: C++ library supported DLL Pin
led mike8-Feb-08 6:38
led mike8-Feb-08 6:38 
GeneralRe: C++ library supported DLL Pin
George_George8-Feb-08 22:04
George_George8-Feb-08 22:04 
GeneralRe: C++ library supported DLL Pin
Hamid_RT10-Feb-08 21:17
Hamid_RT10-Feb-08 21:17 
GeneralRe: C++ library supported DLL Pin
George_George10-Feb-08 22:29
George_George10-Feb-08 22:29 
GeneralRe: C++ library supported DLL Pin
Hamid_RT12-Feb-08 3:02
Hamid_RT12-Feb-08 3:02 
GeneralRe: C++ library supported DLL Pin
George_George12-Feb-08 3:20
George_George12-Feb-08 3:20 
GeneralRe: C++ library supported DLL Pin
Hamid_RT12-Feb-08 4:15
Hamid_RT12-Feb-08 4:15 
GeneralRe: C++ library supported DLL Pin
George_George12-Feb-08 16:41
George_George12-Feb-08 16:41 

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.