Click here to Skip to main content
15,922,145 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: process output Pin
Rajkumar R16-Feb-08 6:49
Rajkumar R16-Feb-08 6:49 
GeneralRe: process output Pin
Rajesh R Subramanian16-Feb-08 4:31
professionalRajesh R Subramanian16-Feb-08 4:31 
GeneralRedirect Output in Edit Box in VC++ Pin
bhat15-Feb-08 20:46
bhat15-Feb-08 20:46 
QuestionRe: Redirect Output in Edit Box in VC++ Pin
Rajkumar R15-Feb-08 20:53
Rajkumar R15-Feb-08 20:53 
GeneralRe: Redirect Output in Edit Box in VC++ [modified] Pin
Rajesh R Subramanian15-Feb-08 20:58
professionalRajesh R Subramanian15-Feb-08 20:58 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
Rajkumar R15-Feb-08 21:06
Rajkumar R15-Feb-08 21:06 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
Rajesh R Subramanian15-Feb-08 21:13
professionalRajesh R Subramanian15-Feb-08 21:13 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
Rajkumar R15-Feb-08 21:18
Rajkumar R15-Feb-08 21:18 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
Rajesh R Subramanian15-Feb-08 21:37
professionalRajesh R Subramanian15-Feb-08 21:37 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
queshangxintou15-Feb-08 21:45
queshangxintou15-Feb-08 21:45 
GeneralRe: Redirect Output in Edit Box in VC++ Pin
Hamid_RT18-Feb-08 7:36
Hamid_RT18-Feb-08 7:36 
GeneralFile access optimization Pin
alex.barylski15-Feb-08 19:26
alex.barylski15-Feb-08 19:26 
Questionhow to add library "advapi32.lib" in settings Pin
guru moorthy.k15-Feb-08 19:25
guru moorthy.k15-Feb-08 19:25 
AnswerRe: how to add library "advapi32.lib" in settings Pin
Cedric Moonen15-Feb-08 21:56
Cedric Moonen15-Feb-08 21:56 
GeneralDifference between CPaintDC and CClientDC Pin
Girish Kumar15-Feb-08 18:54
Girish Kumar15-Feb-08 18:54 
GeneralRe: Difference between CPaintDC and CClientDC Pin
Mark Salsbery17-Feb-08 8:58
Mark Salsbery17-Feb-08 8:58 
GeneralRe: Difference between CPaintDC and CClientDC Pin
Hamid_RT18-Feb-08 7:41
Hamid_RT18-Feb-08 7:41 
GeneralMessage Removed Pin
15-Feb-08 18:50
Armond Sarkisian15-Feb-08 18:50 
GeneralRe: Searching for a file... [modified] Pin
Rajkumar R15-Feb-08 21:51
Rajkumar R15-Feb-08 21:51 
GeneralRe: Searching for a file... Pin
Rajesh R Subramanian15-Feb-08 21:59
professionalRajesh R Subramanian15-Feb-08 21:59 
GeneralRe: Searching for a file... Pin
Rajkumar R15-Feb-08 22:02
Rajkumar R15-Feb-08 22:02 
Generalcomparison problem Pin
gentleguy15-Feb-08 17:09
gentleguy15-Feb-08 17:09 
QuestionRe: comparison problem Pin
Rajkumar R15-Feb-08 20:39
Rajkumar R15-Feb-08 20:39 
GeneralRe: comparison problem Pin
gentleguy15-Feb-08 23:19
gentleguy15-Feb-08 23:19 
GeneralRe: comparison problem Pin
Rajkumar R16-Feb-08 7:47
Rajkumar R16-Feb-08 7:47 
i didn't get u exactly,

li zhiyuan wrote:
if sumOne >=sumOnePre
sumOnePre = sumOne
if sumOne - sumOnePre < 0.015
ct1 = km;// they are calculated already


if ur first if statement succeeds, then second if statement never evaluates to true. if this is ur problem,
SumOne = Calculate();
if (Sumone > SumOnePre) // no need to check >= 
{
  if (sumone - somOnePre < 0.015)
  {
   //stop iteration u mentioned u want to stop iteration within this threshold
  }
  someOnePre = somOne;
}
else // surely sumone - somOnePre < 0.015
{
  //stop iteration
}


li zhiyuan wrote:
doesnot use first if statement, instead taking second if statement

this can happen when sumOne < SumOnePre, if u r expecting Sumone >= SumOnePre, then if g(j) is correct i think intialisation problem,
li zhiyuan wrote:
sumOne = sumOne + g(j);//this is already calculated in my code

does sumOne is initialised?

ur question is not clear.Confused | :confused:

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.