Click here to Skip to main content
16,007,472 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to do error check when reading data from a wsstream object? Pin
followait16-Jul-08 0:02
followait16-Jul-08 0:02 
QuestionUINT64 behavior VC6 C++ Pin
uli200015-Jul-08 23:09
uli200015-Jul-08 23:09 
AnswerRe: UINT64 behavior VC6 C++ Pin
Chris Losinger16-Jul-08 1:20
professionalChris Losinger16-Jul-08 1:20 
GeneralRe: UINT64 behavior VC6 C++ Pin
uli200016-Jul-08 4:26
uli200016-Jul-08 4:26 
Questiondynamic array use? Pin
gentleguy15-Jul-08 23:09
gentleguy15-Jul-08 23:09 
AnswerRe: dynamic array use? Pin
CPallini15-Jul-08 23:16
mveCPallini15-Jul-08 23:16 
GeneralRe: dynamic array use? Pin
gentleguy16-Jul-08 1:37
gentleguy16-Jul-08 1:37 
AnswerRe: dynamic array use? Pin
CPallini16-Jul-08 1:59
mveCPallini16-Jul-08 1:59 
gentleguy wrote:
av1=a4/_iBoundwidth;
av2=a5/_iBoundwidth;


av1, av2 should be declared double (or float).
Then change the above expression to:
av1 = (double)a4 / _iBoundwidth;
av2 = (double)a5 / _iBoundwidth;



gentleguy wrote:
s1=s1+pow(nColumnCounts4[m2]-av1,2.0);
s2=s2+pow(nColumnCounts5[m2]-av2,2.0);

Again, s1, s2 should be declared double.
Those declarations will fix the (otherwise wrong) above expression .


BTW: Are you aware that all that static_casts you're using are useless (and contributes to overall code entropy)?

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


[My articles]

GeneralRe: dynamic array use? Pin
gentleguy16-Jul-08 15:03
gentleguy16-Jul-08 15:03 
GeneralRe: dynamic array use? [modified] Pin
CPallini16-Jul-08 21:02
mveCPallini16-Jul-08 21:02 
QuestionButton Notification Pin
bhanu_850915-Jul-08 22:47
bhanu_850915-Jul-08 22:47 
QuestionRe: Button Notification Pin
Rajesh R Subramanian15-Jul-08 23:02
professionalRajesh R Subramanian15-Jul-08 23:02 
AnswerRe: Button Notification Pin
bhanu_850915-Jul-08 23:04
bhanu_850915-Jul-08 23:04 
GeneralRe: Button Notification Pin
Rajesh R Subramanian15-Jul-08 23:24
professionalRajesh R Subramanian15-Jul-08 23:24 
AnswerRe: Button Notification Pin
Naveen15-Jul-08 23:09
Naveen15-Jul-08 23:09 
GeneralRe: Button Notification Pin
bhanu_850915-Jul-08 23:29
bhanu_850915-Jul-08 23:29 
GeneralRe: Button Notification Pin
Naveen15-Jul-08 23:38
Naveen15-Jul-08 23:38 
GeneralRe: Button Notification Pin
bhanu_850916-Jul-08 0:22
bhanu_850916-Jul-08 0:22 
GeneralRe: Button Notification Pin
Naveen16-Jul-08 14:09
Naveen16-Jul-08 14:09 
QuestionMSMQ ReStart Problem [modified] Pin
sudhir_Kumar15-Jul-08 21:52
sudhir_Kumar15-Jul-08 21:52 
QuestionImage Processing with Goole Earth [modified] Pin
Blade_Bao15-Jul-08 21:03
Blade_Bao15-Jul-08 21:03 
AnswerRe: Image Processing with Goole Earth [modified] Pin
Blade_Bao15-Jul-08 21:09
Blade_Bao15-Jul-08 21:09 
AnswerRe: Image Processing with Goole Earth PinPopular
Stephen Hewitt15-Jul-08 21:31
Stephen Hewitt15-Jul-08 21:31 
GeneralRe: Image Processing with Goole Earth Pin
Blade_Bao15-Jul-08 21:44
Blade_Bao15-Jul-08 21:44 
GeneralRe: Image Processing with Goole Earth Pin
Rajesh R Subramanian15-Jul-08 21:45
professionalRajesh R Subramanian15-Jul-08 21:45 

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.