Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > filebuf vs. fstream
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 17th November 13:42
maya
External User
 
Posts: 1
Default filebuf vs. fstream



Apart from being a pointer, what would be the benefit of using
'std::filebuf' than using the std::fstream?
As far as I can see, I would use the same methods in 'filebuf' that I
would when using std::fstream. Thus my question, what do I gain by using
'std::filebuf' instead of std::fstream?
Thanks folks!!
--
E-Comm Canada
~~~~~~~~~~~~~~~~~~~~~~~
Jorge Escalante

E-Mail Policy
http://www.vif.com/users/escalante/Email_Policy.html

* You cannot exercise your power to a point of
humiliation of others.
- Jean Chretien
* The media's the most powerful entity on earth. They have the
power to make the innocent guilty and to make the guilty
innocent, and that's power. Because they control the minds of the
masses.
- Malcom X
  Reply With Quote


 


2 17th November 13:43
tom_usenet
External User
 
Posts: 1
Default filebuf vs. fstream



Performance, and that's about it. In particular, the read, write, get
and put methods on fstream do error checking, stream flushing (if
unitbuf is set), etc, whereas the equivalent filebuf methods do not
and are therefore faster.

Generally you should use fstream though, unless you have noticed
performance problems.

Tom
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666