Hi, i am writing a program that will ask the user for their shoe size and brand they would like to purchase and store it in a file. it was working but all of a sudden it stopped functioning properly. anything wrong you guys see? It's not writing to the file correctly.
ofstream size_out("Shoe.out" , ios::app); //ios::app is for appending the file(write at the end of the file)
ofstream brand_out ("Shoe.out" , ios::app);
cout<<"Enter the size:"<<endl;
cout<<"Enter the brand:"<<endl;
But if you want to make it with your code i will tell you what is the mistake(maybe not the only one).
Firstly you use only if, but you should know that when there's already an if statement you must use elseif