hey, im havin some wierd errors with this file writing program i made a little while ago:
it is obviously supposed to write the variables totalweight and total height to 15MWeight and 15MHeight respectively. The problem is that it will only write the Height file and not the weight one. I have the EXACT same setup for age 13 (copy + paste + changing 15s to 13s) and it works when I input data with the age being 13. Also i have the exact same setup for a 15 year old female and it works fine, too. anyone know why?Code: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(); }
![]()
![]()
![]()
![]()
thanks a load![]()



LinkBack URL
About LinkBacks




CornedBee