Code:
#include <iostream>
#include <fstream>
#include <string>
using namespace std; //If you are just doing a simple program and only going to be
//using standard namespace, it is easier (and cleaner) to declare it globaly instead
//of usting std:: infront of every freakin thing.
string liftName; //Use string instead of char array
int Max;
int liftingPlanner (string liftName, int Max)
{
cout << "Lift: " <<liftName<<"\n";
cout << " Sets \n";
cout << "Day || 1 2 3 4 5\n";
cout << "| 1 || " <<Max*.6<< " "<<Max*.65<<" "<<Max*.7<<" "<<Max*.75<<" "<<Max*.7<<"\n";
cout << "| 2 || " <<Max*.65<< " "<<Max*.7<<" "<<Max*.75<<" "<<Max*.8<<" "<<Max*.75<<"\n";
cout << "| 3 || " <<Max*.7<< " "<<Max*.75<<" "<<Max*.8<<" "<<Max*.85<<" "<<Max*.8<<"\n";
cout << "| 4 || " <<Max*.75<< " "<<Max*.8<<" "<<Max*.85<<" "<<Max*.9<<" "<<Max*.85<<"\n";
cout << "| Max Day! || *Warm up before maxing* || Max Day!|\n";
return 0;
}
int main()
{
system ("COLOR 1F ");
int counter = 0;
while(counter < 10)
{
cout <<"This program was created by not telling you my real name ;) \nfor BHS in October of 2005\n";
system ("PAUSE");
cout <<"Enter the name of your first lift.\n";
getline(cin,liftName); //getline alows you to get spaces too...so for example 'bench press' can be entered
cout << "Enter your max:\n";
cin >> Max;
liftingPlanner (liftName, Max);
counter++;
return 0;
}
system ("PAUSE");
return 0;
}
That 'fixes' what you posted last.
I assume the return 0 in the file loop is just to stop the loop while you are working on it...