Program to check whether a file is successfully opened or not
//program to check whether a file //is successfully opened or not
#include<fstream.h>
#include<constream.h>
void main()
{
clrscr();
ifstream in("text");
if(!in)
cerr<<"\nFile is not opened";
else
cerr<<"\nFile is opened";
getch();
}
No comments:
Post a Comment
Note: only a member of this blog may post a comment.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.