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. Streambuf problems

Streambuf problems

Scheduled Pinned Locked Moved ATL / WTL / STL
data-structuresquestion
2 Posts 2 Posters 1 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.
  • C Offline
    C Offline
    Cold_Fearing_Bird
    wrote on last edited by
    #1

    I construct a Streambuf with "an array of char". and use the steambuf to construct a ostream/istream:strm. But the strm cannot do anything with "char array".like << | >> doesn't affect the char array data. Have I missed something?

    O 1 Reply Last reply
    0
    • C Cold_Fearing_Bird

      I construct a Streambuf with "an array of char". and use the steambuf to construct a ostream/istream:strm. But the strm cannot do anything with "char array".like << | >> doesn't affect the char array data. Have I missed something?

      O Offline
      O Offline
      Orjan Westin
      wrote on last edited by
      #2

      Without source code, it's hard to say. The streams shouldn't see a char array, but a streambuf. It's up to the streambuf to provide the functionality the stream needs for its internal use. The streaming operators << and >> work on streams, not streambuf. For instance, when streaming a character out (strm << 'o';) the ostream will call streambuf::sputc to add it to the buffer.

      modified on Wednesday, September 7, 2011 7:37 AM

      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