fclosall() and std::ofstream?

D

Dave Johansen

Is it ok to call fcloseall() when using both C-style FILE * and C++
std::eek:fstream's to read files in a program?
Thanks,
Dave
 
J

Jack Klein

Is it ok to call fcloseall() when using both C-style FILE * and C++
std::eek:fstream's to read files in a program?
Thanks,
Dave

No idea. There is no "fcloseall()" function in either the standard C
or the standard C++ library. So you will have to consult the provider
to find out what it does or does not do.

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html
 
D

Dave Johansen

No idea.  There is no "fcloseall()" function in either the standard C
or the standard C++ library.  So you will have to consult the provider
to find out what it does or does not do.

--
Jack Klein
Home:http://JK-Technology.Com
FAQs for
comp.lang.chttp://c-faq.com/
comp.lang.c++http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++http://www.club.cc.cmu.edu/~ajo/docs/FAQ-acllc.html

I did a little more research and it is actually a GNU and Microsoft
extension, but it causes problems when using static/global fstream's
because the destructors try to close the FILE * that has already been
closed.

Dave
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,764
Messages
2,569,566
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top