Advertisement
Maruf_Hasan

clear list

Jun 24th, 2019
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. void Admin::Clear_all()
  2. {
  3. cout<<"Are You Sure to Delete "<<endl;
  4. cout<<"Enter 1 for Yes"<<endl;
  5. cout<<"2 for No"<<endl;
  6. int choice;
  7. cin>>choice;
  8. if(choice==1)
  9. {
  10. cout<<"1 to Delete Featured Phonelist"<<endl;
  11. cout<<"2 to Delete Midrange Phonelist"<<endl;
  12. cout<<"3 to Delete Flagship Phonelist"<<endl;
  13. cout<<"4 to Delete Apple Phonelist"<<endl;
  14. cout<<"0 to Delete All"<<endl;
  15. int x;
  16. cin>>x;
  17. if(x==1)
  18. {
  19. remove("Featuredphone.csv");
  20. }
  21. else if(x==2)
  22. {
  23. remove("Midrangedphone.csv");
  24. }
  25. else if(x==3)
  26. {
  27. remove("Flagship_phone.csv");
  28. }
  29. else if(x==4)
  30. {
  31. remove("Apple_phone.csv");
  32. }
  33. else if(x==0)
  34. {
  35. remove("Featuredphone.csv");
  36. remove("Midrangedphone.csv");
  37. remove("Flagship_phone.csv");
  38. remove("Applephone.csv");
  39.  
  40. }
  41. }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement