CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Difference between filestream and filebuf

    Hello to all, what is the difference between these two clasees ?

    fstream and stringstream derived from class stream.
    filebuf and stringbuf derived from class streambuf.

    And ofstream also used filebuf as its underlying implementation write to file.
    Besides that, we can derived from streambuf for custom use.

    Thanks.
    Last edited by Peter_APIIT; July 11th, 2009 at 05:10 AM.
    Thanks for your help.

  2. #2
    Join Date
    Apr 2007
    Location
    Mars NASA Station
    Posts
    1,436

    Re: Difference between filestream and filebuf

    I hope someone can explain this.
    Thanks for your help.

  3. #3
    Join Date
    Mar 2008
    Posts
    38

    Re: Difference between filestream and filebuf

    never knew about the *buf classes. Googling it tells me the difference is that stringstream is a class for "users" and stringbuf is a class for "developers." In other words if you want to develop your own stringstream, then you can derive from stringbuf. However, most developers will use stringstream as they are interesed in "using" a string API, not "developing" one. Hope that helps.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured