#include <windows.h>
#include <iostream>
int main() {
LPCWSTR path = L"C:\\CPP_Examples\\example.txt";
if (DeleteFileW(path)) {
std::wcout << L"File deleted successfully\n";
}
else {
std::wcout << L"DeleteFile failed. Error: " << GetLastError() << L"\n";
}
return 0;
}
/*
run:
File deleted successfully
*/