#include <iostream> #include <cstdio> int main() { const char* filename = "example.txt"; if (remove(filename) == 0) { std::cout << "File deleted successfully." << std::endl; } else { std::cerr << "Error deleting file." << std::endl; } return 0; }