#include <fstream> or <fstream.h>? 
Author Message
 #include <fstream> or <fstream.h>?

Hi,

What is the difference between #include <fstream> and <fstream.h>?

I'm trying to opena  file with shared mode. Only the fstream.h receives a
sharing mode. Why the <fstream> deosn't? And, how can I get it t be shared?

thanks for any info,
Lior Messinger



Wed, 22 Jan 2003 03:00:00 GMT  
 #include <fstream> or <fstream.h>?
The header <fstream.h> refers to the old iostreams library.  The
header <fstream> referes to the new ISO Standard C++ iostreams
library.   While the two are quite similar, they have enough syntax
differences to confuse people.

If you need to specify things like sharing mode, I think you may be
forced to stick with the older version of iostreams.  I'm not certain
of this (I don't have a reference handy) but off the top of my head I
don't think that the newer versions allow you to specify sharing mode
or much more than binary vs. text mode and the like.

Also the the forms of iostreams two cannot be mixed in the same
application.

Get yourself a good reference/tutorial  for the Standard C++ Library
for more on this.  The MSDN docs cover the basics without any
explanation.

Joe O'


Quote:
> Hi,

> What is the difference between #include <fstream> and <fstream.h>?

> I'm trying to opena  file with shared mode. Only the fstream.h
receives a
> sharing mode. Why the <fstream> deosn't? And, how can I get it t be
shared?

> thanks for any info,
> Lior Messinger



Fri, 24 Jan 2003 03:00:00 GMT  
 
 [ 2 post ] 

 Relevant Pages 

1. <<<<<<<Parsing help, please>>>>>>>>

2. File Format conversion, ascii freeform -->.csv <-->.wk1<-->dbf<-->?HELP

3. <<<>>>Need C code advice with functions and sorting.<<<>>>

4. <><><>HELP<><><> PCMCIA Motorola Montana 33.6

5. pb with replacing <fstream.h> by <fstream>

6. <fstream.h> and <fstream> chaos

7. <fstream.h> or <fstream>

8. <fstream> vs <fstream.h>

9. >>>Windows Service<<<

10. <fstream>

11. <fstream> and file sharing

12. proposal: <basic.h>, <pascal.h>, <fortran.h>, <cobol.h>

 

 
Powered by phpBB® Forum Software