hmmmm....like i said before the 15 year old male category is the only section that doesnt work, and the even wierder thing is why would it create the height file but not the weight? f anything you would think it would be the other way around.
Code:
if (gendermale == true)
{
if(age == 13)
{
ofstream fout("13MWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("13MHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 14)
{
ofstream fout("14MWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("14MHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 15)
{
ofstream fout("15MWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("15MHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 16)
{
ofstream fout("16MWeight.txt", ios::app);
fout << totalheight <<'\n';
fout.close();
ofstream fout2("16MHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
}
if (gendermale == false)
{
if(age == 13)
{
ofstream fout("13FWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("13FHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 14)
{
ofstream fout("14FWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("14FHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 15)
{
ofstream fout("15FWeight.txt", ios::app);
fout << totalweight <<'\n';
fout.close();
ofstream fout2("14FHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}
if(age == 16)
{
ofstream fout("16FWeight.txt", ios::app);
fout << totalheight <<'\n';
fout.close();
ofstream fout2("16FHeight.txt", ios::app);
fout2 << totalheight <<'\n';
fout2.close();
}