hey guys i got a big prob, this program works...sorta but im having troubles getting this loop to work right, i suck at while loops so i need help, heres the code
the problem is at the end, when i try and loop it so that the user can enter more "data", when i go to enter 'y' so that it can start over the program crashes, im almost posative that its the loop, but anyways i really need help on this one guys, thanks!Code:#include <iostream> #include <string> #include <fstream> using namespace std; void autocheck(); void main() { int sellerID; int autoID; double price; int c; ofstream fileout; while(c != 'y'){ cout<<"Please Enter Seller ID : "; cin>>sellerID; cin.get(); system("cls"); cout<<"Please Enter Auto ID : "; cin>>autoID; cin.get(); cout<<"Pease Enter Price : $"; cin>>price; cin.get(); fileout.open("C:/sellerID.txt",ios::app); fileout<<sellerID<<" "; fileout.close(); fileout.open("C:/autoID.txt",ios::app); fileout<<"Seller's ID# "<<sellerID<<endl; fileout<<"Auto ID# "<<autoID<<endl; fileout<<"Price Sold "<<price<<endl<<endl; cout<<"Would You Like To Make Another Entry? y/n : "; cin>>c;} }