I am trying this code for a few first times only. I am not able to get to the root of the error.
Here is the code:
#include "stdafx.h"
#include <iostream>
#include <fstream>
using namespace std;
int _tmain(int argc, _TCHAR* argv[])
{
fstream file;
file.open("C:\\Users\\AfzaalAhmad\\Documents\\text.txt");
return 0;
}
The file is present at the location. Here is a screenshot of the file system.
There is no exception in this case, but the file is never opened!
Where am I missing code?