How to delete a file from my Desktop using c++

  • Thread starter Thread starter StudiousStudent
  • Start date Start date
S

StudiousStudent

Guest
I'm trying to delete a file from my desktop. Any help would be appreciated.

const int result = remove("C:\\Users\\user1\OneDrive\Desktop\file1.exe");
if (result == 0)
{
cout << "\nsuccess" << endl;
}
else
{
cout << "\nNo success" << endl;
}




StudiousStudent

Continue reading...
 
Back
Top