home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #1 / NN_1993_1.iso / spool / gnu / g / help / 1649 < prev    next >
Encoding:
Internet Message Format  |  1993-01-08  |  841 b 

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!saimiri.primate.wisc.edu!ames!sun-barr!sh.wide!wnoc-kyo!omrongw!frf!suran
  2. From: suran@nff.ncl.omron.co.jp (Suran de SILVA)
  3. Newsgroups: gnu.g++.help
  4. Subject: ostream
  5. Message-ID: <SURAN.93Jan8173411@banquo.nff.ncl.omron.co.jp>
  6. Date: 8 Jan 93 08:34:11 GMT
  7. Sender: news@frf.omron.co.jp
  8. Distribution: gnu
  9. Organization: OMRON Corp., Kyoto, Japan
  10. Lines: 22
  11.  
  12.  
  13. Hi,
  14.  
  15. I would like to bind a file to ostream, ie. using code looking something
  16. like:
  17.  
  18. FILE *fp;
  19.  
  20. fp = fopen("myFile.dat","w");
  21. ostream myfile(fp);
  22.  
  23. myfile << "This is new data:";
  24.  
  25. I was able to do this okay in g++ v1.39.1 with libg++ v1.39.0
  26. but using g++ v2.3.3 with libg++ v2.3 this fails.
  27.  
  28. Would someone now how to correctly attach a FILE pointer to an
  29. ostream in order to do this, in the newer g++?
  30.  
  31. Thanks,
  32. Suran.
  33. suran@nff.ncl.omron.co.jp
  34.