PDA

Click to See Complete Forum and Search --> : how do I "Store" information for later use?


evil_gamer
Sep 24th, 2001, 01:39 AM
Say a program asks for some information, for example

yoName
yoHoursWorked
yoPayrate
theyTake

as the program takes the intered information and stores it for use later

So eventualy you will end up with something like below printed at the command line:

Well, yoName, that yoHoursWorked hours you worked this week at a yoPayrate got you $92.01 before taxes, and after a theyTake percent tax rate, you ended up with $84.34 Total and a loss of $7.67! Ouch!

Vlatko
Sep 24th, 2001, 06:49 AM
Store that info in a file. Have a look at the FAQ for an example.

Megatron
Sep 24th, 2001, 02:48 PM
If it's something as short term as that, couldn't you just use variables?

char* sName;
float fPayRate;

cout << "Enter name: ";
cin >> sName;
cout << "Enter pay rate: ";
cin >> fPayRate;

Vlatko
Sep 24th, 2001, 05:08 PM
Well i'm not sure what he means by later. How much later? :confused:

evil_gamer
Sep 25th, 2001, 04:09 AM
Never mind, I figured it out :)
I was jus typing the code wrong :eek:
:)