Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6176385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T00:05:36+00:00 2026-05-24T00:05:36+00:00

27.6.3.4.2 Buffer management and positioning pos_type seekoff(off_type off, ios_base::seekdir way, ios_base::openmode which = ios_base::in

  • 0

27.6.3.4.2 Buffer management and positioning

pos_type seekoff(off_type off, ios_base::seekdir way,
    ios_base::openmode which = ios_base::in | ios_base::out);
  • Effects: Alters the stream positions within one or more of the
    controlled sequences in a way that is defined separately for each
    class derived from basic_streambuf in this Clause (27.8.2.4,
    27.9.1.5).
  • Default behavior: Returns pos_type(off_type(-1)).

So far, so good. The basic_streambuf derivation I’m using can alter its position separately for ios_base::in and/or ios_base::out. But, what do I need to return when both are specified?

If you specify ios_base::in or ios_base::out, we would return new stream position of the specific sequence.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T00:05:36+00:00Added an answer on May 24, 2026 at 12:05 am

    It is a bit up to your stream to define what happens. The built in streams differ, in that some can have separate read and write positions (stringstream) while others just have one (fstream).

    If the user does a reposition and specify both in and out, perhaps you should move both. If it is a seek with a zero offset to get the current position, it is not unreasonable to fail if the positions differ.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want to double buffer a custom control which contains buttons. I have tried
If I have a buffer which contains the data of a file, how can
I'm looking for the fastest way to popcount on large buffer of 512 or
I'm looking for simple sound engine without advanced effects but with good management of
I have a memory buffer corresponding to my screen resolution (1280x800 at 24-bits-per-pixel) that
Can there be buffer overflow/overrun vulnerabilities in completely managed asp.net web portal.If yes how
I know that buffer overruns are one potential hazard to using C-style strings (char
I need a byte buffer class in Java for single-threaded use. I should be
I want my emacs buffer to have a different name than the file name.
Is Protocol Buffer for .NET gonna be lightweight/faster than Remoting(the SerializationFormat.Binary)? Will there be

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.