fstream(file_name,ios::in|ios::nocreate,NULL);
if( is_open() ){
close();
do opened stuff
}
else{
do closed stuff
}
Thats an existance test, an empty test probably requires other functions. I like using fopen/fread/fwrite/fclose
|
Results 1 to 2 of 2
Thread: Testing to see if a file existsThreaded View
|
Click Here to Expand Forum to Full Width |