// FileAccessChecker #include #include #include using namespace std; int main() { string filePath = "C:\\Users\\user\\Desktop\\test.txt"; int a = 5; if (a<4) { ifstream file(filePath); cout << "File opened successfully." << endl; file.close(); } else { cerr << "Unable to open file: " << filePath << endl; } return 0; }