After executing the code, i couldn't find the newly created file in my desktop. Could anyone tell where a created file will be saved in?
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
ofstream testfile("testing.txt");
if (testfile.is_open())
{
testfile << "This is a line.\n";
testfile << "This the second line.\n";
testfile.close();
}
else cout << "Unable to open file";
return 0;
}