Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. ATL / WTL / STL
  4. Depcrecated stl-streams

Depcrecated stl-streams

Scheduled Pinned Locked Moved ATL / WTL / STL
c++helptutorial
5 Posts 3 Posters 6 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • K Offline
    K Offline
    klawipo
    wrote on last edited by
    #1

    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

    C 1 Reply Last reply
    0
    • K klawipo

      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

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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

      K 1 Reply Last reply
      0
      • C Christian Graus

        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

        K Offline
        K Offline
        klawipo
        wrote on last edited by
        #3

        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.:~

        C T 2 Replies Last reply
        0
        • K klawipo

          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.:~

          C Offline
          C Offline
          Christian Graus
          wrote on last edited by
          #4

          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

          1 Reply Last reply
          0
          • K klawipo

            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.:~

            T Offline
            T Offline
            Taka Muraoka
            wrote on last edited by
            #5

            I had this same problem ages ago. IIRC, these old flags were a Microsoft-specific thing and were dropped because they're not part of the standard (!)


            I'd wear a miniskirt and pimp myself for an extra ten grand a year. - David Wulff
            Awasu[^]: A free RSS reader with support for Code Project.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups