The code I have now is extremely raw.. but working.
- Code: Select all
using namespace std;
//calls the get input function.
int choice, choice2;
system("cls"); //clears the screen...just to keep it clean.
cout << "This program will clean your floppy of files. 1=continue 2=quit" << endl;
cin >> choice;
if (choice == 1)
cout << "Thank you for playing! Goodbye!" << endl;
//end of get input
cout << " " << endl;
cout << " Do you have more to erase? 1=yes 2=no" <<endl;
cin >> choice2;
if(choice2 == 1)
// this if statement calls the get input function...whice takes it
// back to the beginning.
cout <<" Thank you for using my program! " << endl;
//end of erase
See where I call the system? Thats where all this is going down... I need to have the program 'try' to delete the things on the floppy... but 'catch' itself if there is a) no floppy disk in the drive... or b) no files on that disc...
Hmm.. .explaining this is tougher than I thought... It's like a beefed up if statement... I just have no Idea how to impliment something like that.. I need someone to show me how... The websites I have visited looking for info on try-catch statements are only making it worse... so any help / example code would be much apprechiated...
If you have any questions on what I was trying to explain... drop me a pm or make a post please![/code]