how can i use ifstream to check whether the file exists?
Try to open it.
yes but i need the code to check if its open!
Code: ifstream is("file.txt"); if(!is) cerr << "Error Opening File\n";
ifstream is("file.txt"); if(!is) cerr << "Error Opening File\n";
cheers mate