float array[100];
Is there a way to take the array above a use the [100] in sequence? such as a having it check to see if [0] is used and if so then move on to [1] and so on...
any help would...
Type: Posts; User: new2tehgame
float array[100];
Is there a way to take the array above a use the [100] in sequence? such as a having it check to see if [0] is used and if so then move on to [1] and so on...
any help would...
this is balance.cpp where the value is stored
V.p_bal
And im just postin all of this because there might be more people that had my prob.
This is the header file....
#include <iostream>
#include <fstream>
using namespace std;
void clrscr();
void MENU();
class variables
{
public :
#include "data2.h"
int main()
{
ifstream bal_i ("balance.cpp");
bal_i>>V.p_bal;
bal_i.close();
ofstream bal_o ("balance.cpp");
clrscr();
{
thx for the help, and for puttin up with my stupidity.... i had used the fstream before but i guess i messed it up.... i rewrote it and now it works.
#include "data2.h"
int main()
{
clrscr();
{
if(V.p_bal == 0)
{
cout<<"Please input a starting balance.\n";
cout<<">";
I know how to do that stuff... and i have read the tutorials.
But i left out that i wanted the variable to be forever changing. Based on user input.
How would i go about storing a value, and everytime that i open my program, it would load that value?
sry, i just started learning the language.... and i didnt really see anything in the tutorials...