Click here to Skip to main content
15,919,340 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: mfc42.dll Pin
Steve S26-Sep-03 6:00
Steve S26-Sep-03 6:00 
GeneralRe: mfc42.dll Pin
Orhun Birsoy26-Sep-03 6:03
Orhun Birsoy26-Sep-03 6:03 
Generalabout clipboard Pin
rcw7526-Sep-03 2:34
rcw7526-Sep-03 2:34 
GeneralRe: about clipboard Pin
David Crow26-Sep-03 2:54
David Crow26-Sep-03 2:54 
GeneralArray Pin
sardinka26-Sep-03 2:34
sardinka26-Sep-03 2:34 
GeneralRe: Array Pin
Adam Gritt26-Sep-03 2:46
Adam Gritt26-Sep-03 2:46 
GeneralRe: Array Pin
sardinka26-Sep-03 3:00
sardinka26-Sep-03 3:00 
GeneralRe: Array Pin
Adam Gritt26-Sep-03 3:20
Adam Gritt26-Sep-03 3:20 
// include <float.h> and <iostream> in stdafx.h
#include "stdafx.h"

using namespace std;
const NUM = 2;
// changed int to double because volume usually isn't in whole numbers
//int volumes[NUM], volume;
double volumes[NUM], volume;
int count=0;
// use double for amounts because you are using doubles to multiply
double amounts[NUM],amount;
const double price=0.05;
const double fee=12.0;

int main()
{
do
{
cout<<"Please enter the volume of water used by a customer ";
// cout won't get you the value must use cin
//cout<volume;
cin="">> volume;

// with doubles never check for equality, check for greater or
// less than
if (volume < DBL_MIN )
break;

// move this check to the end of the while loop
// and make it check for >= instead of ==
//if (count==NUM)
// break;

// also you are incrementing count twice. only do it once
//volumes[count++]=volume;
amount=(volume*price)+fee;
//amounts[count++]=amount;

volumes[count] = volume;
amounts[count] = amount;
count++;

if( count >= NUM )
break;
}
while(true);
return 0;
}
GeneralRe: Array Pin
sardinka26-Sep-03 3:35
sardinka26-Sep-03 3:35 
GeneralRe: Array Pin
Adam Gritt26-Sep-03 3:48
Adam Gritt26-Sep-03 3:48 
GeneralRe: Array Pin
sardinka26-Sep-03 3:53
sardinka26-Sep-03 3:53 
QuestionHow to dump debug information to VC 6.0's debug window in a MFC project? Pin
George226-Sep-03 2:04
George226-Sep-03 2:04 
AnswerRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
Adam Gritt26-Sep-03 2:48
Adam Gritt26-Sep-03 2:48 
GeneralRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
George226-Sep-03 3:08
George226-Sep-03 3:08 
AnswerRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
David Crow26-Sep-03 2:57
David Crow26-Sep-03 2:57 
GeneralRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
George226-Sep-03 3:09
George226-Sep-03 3:09 
GeneralRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
Adam Gritt26-Sep-03 3:25
Adam Gritt26-Sep-03 3:25 
GeneralRe: How to dump debug information to VC 6.0's debug window in a MFC project? Pin
George226-Sep-03 3:40
George226-Sep-03 3:40 
GeneralVC++ / VB CreateObject Function Pin
Carlos Mariano26-Sep-03 1:54
Carlos Mariano26-Sep-03 1:54 
Generalchange ip adress via visual c++ Pin
User 21595626-Sep-03 1:31
User 21595626-Sep-03 1:31 
GeneralRe: change ip adress via visual c++ Pin
igor196026-Sep-03 7:47
igor196026-Sep-03 7:47 
GeneralDirect draw and Multimon problem Pin
Member 91916026-Sep-03 1:30
Member 91916026-Sep-03 1:30 
GeneralResolution problem with my MFC - programms under Windows 2000 Pin
postamt26-Sep-03 1:11
postamt26-Sep-03 1:11 
GeneralKill a Process Pin
cberam26-Sep-03 1:04
cberam26-Sep-03 1:04 
GeneralRe: Kill a Process Pin
David Crow26-Sep-03 3:00
David Crow26-Sep-03 3: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.