-
July 11th, 2009, 03:59 AM
#1
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.
-
July 12th, 2009, 09:38 PM
#2
Re: Difference between filestream and filebuf
I hope someone can explain this.
Thanks for your help.
-
July 13th, 2009, 07:52 AM
#3
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|