Troubles with opening a file, suddenly

Hi, can't open text nor binary files. I have read already other topics, tried all advises. Unfortunately, nothing works.

1
2
3
4
5
6
7
8
9
10
11
12
#include <iostream>
#include <fstream>
using namespace std;
int main()
{
    ifstream inOutFile;
    inOutFile.open("students.txt");
    if (!inOutFile)
	cout<< "error";

    return 0;
}
Does the file exist in the current directory?
Thanks!
Last edited on
Topic archived. No new replies allowed.