Click here to Skip to main content
15,908,437 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: how to use CButton class in win 32 Pin
CPallini26-Jan-11 21:30
mveCPallini26-Jan-11 21:30 
Questionhow to close document handle Pin
VCsamir26-Jan-11 18:19
VCsamir26-Jan-11 18:19 
AnswerRe: how to close document handle Pin
Cedric Moonen26-Jan-11 20:38
Cedric Moonen26-Jan-11 20:38 
AnswerRe: how to close document handle Pin
CPallini26-Jan-11 22:02
mveCPallini26-Jan-11 22:02 
GeneralRe: how to close document handle Pin
VCsamir26-Jan-11 22:21
VCsamir26-Jan-11 22:21 
GeneralRe: how to close document handle Pin
Richard MacCutchan26-Jan-11 22:38
mveRichard MacCutchan26-Jan-11 22:38 
Questionelse does nto return expected value Pin
jharn26-Jan-11 9:34
jharn26-Jan-11 9:34 
AnswerRe: else does nto return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 9:47
TheGreatAndPowerfulOz26-Jan-11 9:47 
First, if it's returning a large value, then my suggestion as that 'p' is between 0.000611657 && 22.06495.

On the other hand, how do you know that x was assigned '0'?

Second, for programming clarity, may I suggest one of the following: (my preference is #2)

1. getting rid of the two returns and have only one return after the closing brace ({) of the else,
if (a)
{
   ...
   b = 1
}
else
{
   b = 2
}
return b;

2. OR, remove the else
if (a)
{
   b = 1;
   return b;
}

b = 2;
return b;

"If your actions inspire others to dream more, learn more, do more and become more, you are a leader." - John Quincy Adams

GeneralRe: else does not return expected value Pin
jharn26-Jan-11 10:04
jharn26-Jan-11 10:04 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:08
TheGreatAndPowerfulOz26-Jan-11 10:08 
GeneralRe: else does not return expected value Pin
jharn26-Jan-11 10:10
jharn26-Jan-11 10:10 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:12
TheGreatAndPowerfulOz26-Jan-11 10:12 
GeneralRe: else does not return expected value Pin
jharn26-Jan-11 10:21
jharn26-Jan-11 10:21 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:44
TheGreatAndPowerfulOz26-Jan-11 10:44 
AnswerRe: else does not return expected value Pin
jharn26-Jan-11 11:04
jharn26-Jan-11 11:04 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 11:07
TheGreatAndPowerfulOz26-Jan-11 11:07 
GeneralRe: else does not return expected value Pin
jharn26-Jan-11 11:12
jharn26-Jan-11 11:12 
GeneralRe: else does not return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:10
TheGreatAndPowerfulOz26-Jan-11 10:10 
QuestionRe: else does nto return expected value Pin
Maximilien26-Jan-11 9:56
Maximilien26-Jan-11 9:56 
AnswerRe: else does nto return expected value Pin
jharn26-Jan-11 10:08
jharn26-Jan-11 10:08 
GeneralRe: else does nto return expected value Pin
TheGreatAndPowerfulOz26-Jan-11 10:14
TheGreatAndPowerfulOz26-Jan-11 10:14 
GeneralRe: else does nto return expected value Pin
Cedric Moonen26-Jan-11 20:35
Cedric Moonen26-Jan-11 20:35 
GeneralRe: else does nto return expected value Pin
Stefan_Lang27-Jan-11 2:20
Stefan_Lang27-Jan-11 2:20 
AnswerRe: else does nto return expected value Pin
Richard MacCutchan26-Jan-11 22:41
mveRichard MacCutchan26-Jan-11 22:41 
QuestionReturning a Reference Pin
Anthony Mushrow26-Jan-11 7:59
professionalAnthony Mushrow26-Jan-11 7:59 

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.