Click here to Skip to main content
15,893,161 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionHow to clear screen??? Pin
Richard Cheng29-Jun-01 10:40
Richard Cheng29-Jun-01 10:40 
GeneralWinCE memory management Pin
Avneesh Bhatnagar29-Jun-01 9:29
Avneesh Bhatnagar29-Jun-01 9:29 
GeneralConsole App Help Pin
29-Jun-01 8:55
suss29-Jun-01 8:55 
GeneralCreating a document/view pair Pin
Jake Palmer29-Jun-01 8:40
Jake Palmer29-Jun-01 8:40 
GeneralRe: Creating a document/view pair Pin
J Patel29-Jun-01 8:44
J Patel29-Jun-01 8:44 
GeneralRe: Creating a document/view pair Pin
Jake Palmer29-Jun-01 9:07
Jake Palmer29-Jun-01 9:07 
QuestionCStatusBar in a dialog? Pin
29-Jun-01 7:44
suss29-Jun-01 7:44 
QuestionWhat happened here????? Wrong variable type??? Pin
Richard Cheng29-Jun-01 7:29
Richard Cheng29-Jun-01 7:29 
Here is the codes

float a,b;

a = (( (AlphaTotal - PrevAlphaTotal) / PrevAlphaTotal ) * 100 );
b = (( (BetaTotal - PrevBetaTotal ) / PrevBetaTotal ) * 100 );

CString testing;
CStringList ReturnedData;

testing.Format("Alpha Percentage %f", a );
ReturnedData.AddTail(testing);
testing.Format("Beta Percentage %f", b );
ReturnedData.AddTail(testing);
(--->ReturnedData will be used to output in view class)

The results would be:
If a or b = 65.50...it displays 0.00
If a or b = 180.50...it displays 100.00

Why i know that because.....I try just type some number in the formula...for example,

a = ((700-500)/500)*100;
b = ((81-60)/60)*100;

Then output is:
Alpha Percentage 0.00
Beta Percentage 0.00

How to fix it??????????????????????


Poke tongue | ;-P
AnswerRe: What happened here????? Wrong variable type??? Pin
Michael Dunn29-Jun-01 7:33
sitebuilderMichael Dunn29-Jun-01 7:33 
GeneralRe: What happened here????? Wrong variable type??? Pin
Richard Cheng29-Jun-01 7:54
Richard Cheng29-Jun-01 7:54 
GeneralRe: What happened here????? Wrong variable type??? Pin
Richard Cheng29-Jun-01 7:58
Richard Cheng29-Jun-01 7:58 
GeneralRe: What happened here????? Wrong variable type??? Pin
Michael Dunn29-Jun-01 11:55
sitebuilderMichael Dunn29-Jun-01 11:55 
GeneralLoading a bitmap over a network Pin
Jack Mott29-Jun-01 7:12
Jack Mott29-Jun-01 7:12 
GeneralRe: Loading a bitmap over a network Pin
Drake Elsari29-Jun-01 7:20
Drake Elsari29-Jun-01 7:20 
GeneralRe: Loading a bitmap over a network Pin
Jack Mott29-Jun-01 7:35
Jack Mott29-Jun-01 7:35 
GeneralRe: Loading a bitmap over a network Pin
Drake Elsari30-Jun-01 14:52
Drake Elsari30-Jun-01 14:52 
GeneralPainting a bitmap over a CStatic Bitmap Pin
29-Jun-01 7:07
suss29-Jun-01 7:07 
GeneralRe: Painting a bitmap over a CStatic Bitmap Pin
29-Jun-01 12:20
suss29-Jun-01 12:20 
GeneralRe: Painting a bitmap over a CStatic Bitmap Pin
29-Jun-01 13:56
suss29-Jun-01 13:56 
GeneralArrays n'stuff Pin
John Uhlenbrock29-Jun-01 7:04
John Uhlenbrock29-Jun-01 7:04 
GeneralRe: Arrays n'stuff Pin
Michael Dunn29-Jun-01 7:36
sitebuilderMichael Dunn29-Jun-01 7:36 
GeneralRe: Arrays n'stuff Pin
John Uhlenbrock29-Jun-01 10:32
John Uhlenbrock29-Jun-01 10:32 
GeneralRe: Arrays n'stuff Pin
Ben Burnett29-Jun-01 11:34
Ben Burnett29-Jun-01 11:34 
QuestionHow do I get LOGFONT from an IFont without using CFont? Pin
Bart-Man29-Jun-01 6:18
Bart-Man29-Jun-01 6:18 
AnswerRe: How do I get LOGFONT from an IFont without using CFont? Pin
PJ Arends29-Jun-01 17:00
professionalPJ Arends29-Jun-01 17:00 

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.