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. C / C++ / MFC
  4. iostream compatibility problems

iostream compatibility problems

Scheduled Pinned Locked Moved C / C++ / MFC
2 Posts 2 Posters 0 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.
  • V Offline
    V Offline
    Varghese Paul M
    wrote on last edited by
    #1

    I am in the middle of porting one of my C++ project which is using old iostream (shipped with VC6.0) into new iostream implemented in stlport version 5.2 I found that some of the stream related methods are not available in the new iostream class. The compiler gives me error for the following methods streambuf::allocate() streambuf::doallocate() streambuf::blen() ostream::osfx() ostream::opfx() streambuf::base() streambuf::ebuf() streambuf::setb() Am I missing something? Are there any equivalent methods available in new iostream library? How can I substitute these functions when I port into new stlport/VS2008 iostream? Thanks in advance

    cheers Varghese Paul

    S 1 Reply Last reply
    0
    • V Varghese Paul M

      I am in the middle of porting one of my C++ project which is using old iostream (shipped with VC6.0) into new iostream implemented in stlport version 5.2 I found that some of the stream related methods are not available in the new iostream class. The compiler gives me error for the following methods streambuf::allocate() streambuf::doallocate() streambuf::blen() ostream::osfx() ostream::opfx() streambuf::base() streambuf::ebuf() streambuf::setb() Am I missing something? Are there any equivalent methods available in new iostream library? How can I substitute these functions when I port into new stlport/VS2008 iostream? Thanks in advance

      cheers Varghese Paul

      S Offline
      S Offline
      Stuart Dootson
      wrote on last edited by
      #2

      Varghese Paul M wrote:

      streambuf::allocate() streambuf::doallocate() streambuf::blen() streambuf::base() streambuf::ebuf() streambuf::setb()

      These all refer to the 'reserve area' of the pre-standard IOStreams streambuf. The standard basic_streambuf doesn't have this concept at all (I guess they decided it was better for that concept not to exist in an abstract stream buffer). This post[^], however, gives a suggestion for a possible solution.

      Varghese Paul M wrote:

      ostream::osfx() ostream::opfx()

      These were functions that ran before (opfx) and after (osfx) every output operation. They've been replaced by the sentry nested class, so rather than this:

      if (os.opfx()) { os.do_something(); }
      os.osfx();

      you have this

      std::ostream::sentry se(os);
      if (se) { os.do_something(); }

      Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

      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