Help | Site Map
Connecting Tech Pros Worldwide
 
 
LinkBack Thread Tools
  #1  
Old March 18th, 2008, 07:25 PM
Dave Johansen
Guest
 
Posts: n/a
Default fclosall() and std::ofstream?

Is it ok to call fcloseall() when using both C-style FILE * and C++
std::ofstream's to read files in a program?
Thanks,
Dave
  #2  
Old March 19th, 2008, 02:55 AM
Jack Klein
Guest
 
Posts: n/a
Default Re: fclosall() and std::ofstream?

On Tue, 18 Mar 2008 11:20:26 -0700 (PDT), Dave Johansen
<davejohansen@gmail.comwrote in comp.lang.c++:
Quote:
Is it ok to call fcloseall() when using both C-style FILE * and C++
std::ofstream'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
  #3  
Old March 19th, 2008, 06:15 AM
Dave Johansen
Guest
 
Posts: n/a
Default Re: fclosall() and std::ofstream?

On Mar 18, 6:45*pm, Jack Klein <jackkl...@spamcop.netwrote:
Quote:
On Tue, 18 Mar 2008 11:20:26 -0700 (PDT), Dave Johansen
<davejohan...@gmail.comwrote in comp.lang.c++:
>
Quote:
Is it ok to call fcloseall() when using both C-style FILE * and C++
std::ofstream'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.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
 

Bookmarks

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

What is Bytes?

We are a network of experts and professionals in IT and software development that help one another with answers to tough questions and share insights. Get the best answers to your questions from over network members.
Post your question now . . .
It's fast and it's free

Popular Articles