<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>FILE * from std::ofstream? - C++ - tribe.net</title>
  <link rel="alternate" href="http://cpp.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47?format=atom" />
  <subtitle>Tribe.net. Local Connections</subtitle>
  <entry>
    <title>Re: FILE * from std::ofstream?</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#9c86b706-7d24-446e-9834-14688fc70d40" />
    <author>
      <name>Jason</name>
    </author>
    <id>http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#9c86b706-7d24-446e-9834-14688fc70d40</id>
    <updated>2006-06-15T05:55:23Z</updated>
    <published>2006-06-15T05:55:23Z</published>
    <summary type="html">Good to hear John :)  Sounds like you made a better design decision in the end :)</summary>
    <dc:creator>Jason</dc:creator>
    <dc:date>2006-06-15T05:55:23Z</dc:date>
  </entry>
  <entry>
    <title>Re: FILE * from std::ofstream?</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#1eeb4718-0340-4441-ad22-4960e6fe6fc1" />
    <author>
      <name>John Michael</name>
    </author>
    <id>http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#1eeb4718-0340-4441-ad22-4960e6fe6fc1</id>
    <updated>2006-06-15T05:00:16Z</updated>
    <published>2006-06-15T05:00:16Z</published>
    <summary type="html">Jason,&#xD;
&#xD;
Alas, I decided to just expose a more abstract interface to the code calling me, and I found a way to get around the (kinda nasty) FILE *.  The iostream stuff just seems safer, anyway ...&#xD;
&#xD;
Regards,&#xD;
&#xD;
John&#xD;
&#xD;
Falling You - exploring the beauty of voice and sound&#xD;
http://www.fallingyou.com</summary>
    <dc:creator>John Michael</dc:creator>
    <dc:date>2006-06-15T05:00:16Z</dc:date>
  </entry>
  <entry>
    <title>Re: FILE * from std::ofstream?</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#cbbdf6bc-4ce2-46ed-a7d7-1e45c7d9ea0f" />
    <author>
      <name>Jason</name>
    </author>
    <id>http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#cbbdf6bc-4ce2-46ed-a7d7-1e45c7d9ea0f</id>
    <updated>2006-06-15T04:53:08Z</updated>
    <published>2006-06-15T04:53:08Z</published>
    <summary type="html">FILE is a straight C type for OS-specific file info.  It is defined in stdio.h.&#xD;
&#xD;
see http://msdn.microsoft.com/library/en-us/vccore98/HTML/_crt_fgetc.2c_.fgetwc.2c_._fgetchar.2c_._fgetwchar.asp?frame=true &#xD;
&#xD;
for an example of using fopen() to obtain a pointer to the FILE info.  I dont know much more about it though... good luck!</summary>
    <dc:creator>Jason</dc:creator>
    <dc:date>2006-06-15T04:53:08Z</dc:date>
  </entry>
  <entry>
    <title>FILE * from std::ofstream?</title>
    <link rel="alternate" href="http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#9f91e8b6-4eb9-4c2a-8a2e-ff8d218cbff0" />
    <author>
      <name>John Michael</name>
    </author>
    <id>http://CPP.tribe.net/thread/9ede4cbe-2a04-4522-8880-6f381ec03e47#9f91e8b6-4eb9-4c2a-8a2e-ff8d218cbff0</id>
    <updated>2006-06-12T05:58:56Z</updated>
    <published>2006-06-12T05:58:56Z</published>
    <summary type="html">Hello, all ...&#xD;
&#xD;
I need to interface a library that expects to communicate through a FILE * to my code written using ofstream.  In these endeavors, I would like to just have my ofstream return a FILE * that this library can use, but I don't see how I can do that.  The ofstream.rdbuf() returns a basic_filebuf, but there seems to be no way of getting a FILE * from it in a cross platform way (this code has to work on Mac OSX, using gcc, as well as Windows, using the MSVC.NET compiler).&#xD;
&#xD;
Am I doomed to a C-style interface to my lower level file objects, just because this library expects a FILE *?  I'm sure i'm not the only one who has run into this ...&#xD;
&#xD;
Regards,&#xD;
&#xD;
John&#xD;
&#xD;
Falling You - exploring the beauty of voice and sound&#xD;
http://www.fallingyou.com</summary>
    <dc:creator>John Michael</dc:creator>
    <dc:date>2006-06-12T05:58:56Z</dc:date>
  </entry>
</feed>



