Search:
Forum
General C++ Programming
about file
about file
May 27, 2010 at 9:49am UTC
qabil
(79)
hy...
I want to make program..my program want the user can open the file (use fstream)
my problem is... I I want to show the error message when the file want to open is not aviliable
ex:
what file you want to open?: D:/qabil.txt //qabil.txt is not aviliable in the hardisk
====file not aviliable ====
May 27, 2010 at 10:48am UTC
RedX
(156)
http://stackoverflow.com/questions/839644/get-stdfstream-failure-error-messages-and-or-exceptions
You can't directly do it in c++. But you can use the c function man 3 perror() to get a better message under linux and under windows there is geterror(), getlasterror() and others.
Topic archived. No new replies allowed.
C++
Information
Tutorials
Reference
Articles
Forum
Forum
Beginners
Windows Programming
UNIX/Linux Programming
General C++ Programming
Lounge
Jobs