Click here to Skip to main content
16,005,162 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Displaying file sizes larger than 2GB? Pin
Mark Salsbery4-Apr-07 8:53
Mark Salsbery4-Apr-07 8:53 
AnswerRe: Displaying file sizes larger than 2GB? Pin
James R. Twine4-Apr-07 12:54
James R. Twine4-Apr-07 12:54 
GeneralRe: Displaying file sizes larger than 2GB? Pin
Wes Jones4-Apr-07 13:11
Wes Jones4-Apr-07 13:11 
GeneralRe: Displaying file sizes larger than 2GB? Pin
James R. Twine4-Apr-07 13:31
James R. Twine4-Apr-07 13:31 
GeneralRe: Displaying file sizes larger than 2GB? Pin
Mark Salsbery4-Apr-07 14:04
Mark Salsbery4-Apr-07 14:04 
QuestionArray Help Please (user defined size) Pin
planetx224-Apr-07 6:22
planetx224-Apr-07 6:22 
AnswerRe: Array Help Please (user defined size) Pin
Bob Flynn4-Apr-07 6:35
Bob Flynn4-Apr-07 6:35 
GeneralRe: Array Help Please (user defined size) Pin
planetx224-Apr-07 10:17
planetx224-Apr-07 10:17 
No problem, I understand and I hope I can learn through my errors. So far my program I think stores a temporary function at the start that converts any value of number entered into a double fahrenheit and returns it to another double celsius.

I stored that there just for formula's sake, and haven't implemented it or really know how to use it yet.

Then i think in this part I have correctly made an array of 50 doubles called myarray. Then i have made an int value flag that is in place of if the user puts a 1 or 0 to continue/stop the program. I want to be able to make an array that is assumed to be less than 50 values, and then the user to keep entering values until done, but I think I have it setup wrong is it just storing the values inputted into myarray[50] only? Do I have to seperatly do myarray[0], myarray[1], etc each time or is there some other loop i can make that can tell the program to keep entering values starting from [0] until when the user wants to stop. Then it should print out how many arrays there are rather than values in them. I just can't figure out how to stop the array and have the values only how many the user inputed, not all 50. Any help greatly appreciated thanks.



// Computer Lab test.cpp : Defines the entry point for the console application.
//

#include "stdafx.h"
#include
using namespace std;

// call this function to convert celsius to fahrenheit (function name is convert)
double
convert(double celsius){
double fahrenheit = ((9.0/5.0) * celsius) + 32;
return fahrenheit;
};

int _tmain(int argc, _TCHAR* argv[])
{
double myarray[50];
int flag;
flag =1;
while (flag==1)
{
// loop
cout << "Enter Temperature Reading:";
cin >>myarray[50]
;cout << " Enter 1 to input more values, 0 to stop";
cin >>flag;
}
return 0;
}
AnswerRe: Array Help Please (user defined size) Pin
David Crow4-Apr-07 7:14
David Crow4-Apr-07 7:14 
GeneralRe: Array Help Please (user defined size) Pin
planetx224-Apr-07 10:21
planetx224-Apr-07 10:21 
GeneralRe: Array Help Please (user defined size) Pin
David Crow4-Apr-07 10:31
David Crow4-Apr-07 10:31 
GeneralRe: Array Help Please (user defined size) Pin
planetx224-Apr-07 10:34
planetx224-Apr-07 10:34 
QuestionRe: Array Help Please (user defined size) Pin
David Crow4-Apr-07 10:41
David Crow4-Apr-07 10:41 
AnswerRe: Array Help Please (user defined size) Pin
planetx224-Apr-07 11:08
planetx224-Apr-07 11:08 
GeneralRe: Array Help Please (user defined size) Pin
David Crow5-Apr-07 2:42
David Crow5-Apr-07 2:42 
Questionerror in comilation:Unhandled exception at 0x004129c8 Pin
lavy28834-Apr-07 6:05
lavy28834-Apr-07 6:05 
AnswerRe: error in comilation:Unhandled exception at 0x004129c8 Pin
James R. Twine4-Apr-07 6:41
James R. Twine4-Apr-07 6:41 
GeneralRe: error in comilation:Unhandled exception at 0x004129c8 Pin
lavy28834-Apr-07 6:56
lavy28834-Apr-07 6:56 
Questioninclude Pin
Anka_Ame4-Apr-07 5:19
Anka_Ame4-Apr-07 5:19 
AnswerRe: include Pin
David Crow4-Apr-07 5:25
David Crow4-Apr-07 5:25 
GeneralRe: include Pin
Anka_Ame4-Apr-07 5:27
Anka_Ame4-Apr-07 5:27 
QuestionRe: include Pin
David Crow4-Apr-07 5:34
David Crow4-Apr-07 5:34 
AnswerRe: include Pin
Eytukan4-Apr-07 6:10
Eytukan4-Apr-07 6:10 
GeneralRe: include Pin
Roger Stoltz4-Apr-07 5:31
Roger Stoltz4-Apr-07 5:31 
AnswerRe: include Pin
Eytukan4-Apr-07 6:08
Eytukan4-Apr-07 6:08 

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.