I am trying to remove a file named File1 like this but this doesn´t remove(delete) this file.
I beleive it is the correct syntax to delete a file.
Code:#include "stdafx.h"
#include <iostream>
#include <fstream>
#include <sstream>
#include <string>
using namespace std;
int main()
{
ifstream input ("File1.txt");
ofstream output ("File2.txt");
{
output << "Text" << "\n";
}
std::remove("File1.txt");
return 0;
}