Depcrecated stl-streams
-
Hello, here's my Problem: if I use the "old" filestreams declared in fstream.h, I get an "Old IOStreams Deprecated" warning. I'd like to use the new ones from the "fstream"-header, but cannot find how to set the old protection flag or something similiar. I need that to keep the file readable from other Applications in some cases. I also need to prevent reading by other Applications in other cases (e.g. Virusscaners), so the old possibility of sharing or protecting external access is needed. thanks for your answers. Klaus
-
Hello, here's my Problem: if I use the "old" filestreams declared in fstream.h, I get an "Old IOStreams Deprecated" warning. I'd like to use the new ones from the "fstream"-header, but cannot find how to set the old protection flag or something similiar. I need that to keep the file readable from other Applications in some cases. I also need to prevent reading by other Applications in other cases (e.g. Virusscaners), so the old possibility of sharing or protecting external access is needed. thanks for your answers. Klaus
I have an excellent reference on iostreams at home, if you can provide a further explantion of the old syntax that is missing, and what it does, I'd be happy to have a look for you. Conversely, people wrote code using the old iostreams, is there any reason beyond the warning that you're loathe to do the same ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
I have an excellent reference on iostreams at home, if you can provide a further explantion of the old syntax that is missing, and what it does, I'd be happy to have a look for you. Conversely, people wrote code using the old iostreams, is there any reason beyond the warning that you're loathe to do the same ? Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
Here the exacter description: One of the old syntax fstream Constructors: fstream (const char* szName, int nMode, int nProt = filebuf::openprot ) with nMode e.g. ios::in for reading files, ios::out for writing files. and nProt e.g. filebuf::sh_none Exclusive mode — no sharing, filebuf::sh_read Read sharing allowed. the new fstream classes simply don't support the "nProt"-Flag in any constructor (as far as 'I know). I'd like to rework my code in terms of the new streams to be able to use it with future Compiler-Versions. I heard with the next .Net's Update old fstreams may no longer be suported. Moreover my Emloyer wants me to change it.:~
-
Here the exacter description: One of the old syntax fstream Constructors: fstream (const char* szName, int nMode, int nProt = filebuf::openprot ) with nMode e.g. ios::in for reading files, ios::out for writing files. and nProt e.g. filebuf::sh_none Exclusive mode — no sharing, filebuf::sh_read Read sharing allowed. the new fstream classes simply don't support the "nProt"-Flag in any constructor (as far as 'I know). I'd like to rework my code in terms of the new streams to be able to use it with future Compiler-Versions. I heard with the next .Net's Update old fstreams may no longer be suported. Moreover my Emloyer wants me to change it.:~
I'm afraid that my reference does not even mention this sort of protection mode. The basic_filebuf object still exists though, but openprot does not exist within it. I'd suggest that your only real option is to create your own streaming class that is derived from iostreams and provides the functionality you're looking for. I have some articles here on CP that would help. Christian No offense, but I don't really want to encourage the creation of another VB developer. - Larry Antram 22 Oct 2002 Hey, at least Logo had, at it's inception, a mechanical turtle. VB has always lacked even that... - Shog9 04-09-2002 Again, you can screw up a C/C++ program just as easily as a VB program. OK, maybe not as easily, but it's certainly doable. - Jamie Nordmeyer - 15-Nov-2002
-
Here the exacter description: One of the old syntax fstream Constructors: fstream (const char* szName, int nMode, int nProt = filebuf::openprot ) with nMode e.g. ios::in for reading files, ios::out for writing files. and nProt e.g. filebuf::sh_none Exclusive mode — no sharing, filebuf::sh_read Read sharing allowed. the new fstream classes simply don't support the "nProt"-Flag in any constructor (as far as 'I know). I'd like to rework my code in terms of the new streams to be able to use it with future Compiler-Versions. I heard with the next .Net's Update old fstreams may no longer be suported. Moreover my Emloyer wants me to change it.:~