Like Tree2Likes

writing to a char buffer as a FILE*

This is a discussion on writing to a char buffer as a FILE* within the C++ Programming forums, part of the General Programming Boards category; Note that fmemopen is not part of the C or C++ standard library....

  1. #16
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,974
    Note that fmemopen is not part of the C or C++ standard library.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  2. #17
    Registered User
    Join Date
    Oct 2006
    Posts
    2,144
    you posted in the C++ forum. why not just use std::stringstream? it does exactly what you want, and unless your requirement is to use the archaic C-style FILE*, you'll be much better off doing it the C++ way.

  3. #18
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    20,974
    Quote Originally Posted by Elkvis
    why not just use std::stringstream? it does exactly what you want, and unless your requirement is to use the archaic C-style FILE*, you'll be much better off doing it the C++ way.
    Because in post #4...
    Quote Originally Posted by Opply
    If I could change the function, I would, but it is a part of a bigger system and I am not allowed to modify it..
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. I am writing a string to an excel file a char per cell
    By jeremy duncan in forum C++ Programming
    Replies: 10
    Last Post: 05-12-2012, 02:09 AM
  2. Replies: 8
    Last Post: 12-22-2011, 09:24 PM
  3. writing a file from buffer
    By mariano_donati in forum C Programming
    Replies: 8
    Last Post: 02-25-2008, 01:04 AM
  4. Writing to screen buffer.
    By h3ro in forum Game Programming
    Replies: 4
    Last Post: 01-15-2008, 06:23 AM
  5. writing char arrays to a file
    By cpluspluser in forum C++ Programming
    Replies: 2
    Last Post: 05-26-2003, 11:17 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21