[#BloombergLP-bdlsb-FixedMemInput-pubseekoff]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlsb.adoc[bdlsb]::xref:BloombergLP/bdlsb/FixedMemInput.adoc[FixedMemInput]::pubseekoff
:relfileprefix: ../../../
:mrdocs:

Set the position indicator to a relative offset in this buffer&period;

== Synopsis

Declared in `&lt;bdlsb&lowbar;fixedmeminput&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
xref:BloombergLP/bdlsb/FixedMemInput/pos_type.adoc[pos&lowbar;type]
pubseekoff(
    xref:BloombergLP/bdlsb/FixedMemInput/off_type.adoc[off&lowbar;type] offset,
    std::ios&lowbar;base::seekdir way,
    std::ios&lowbar;base::openmode which = bsl&colon;&colon;ios&lowbar;base&colon;&colon;in);
----

== Description

Set the position indicator to the relative specified `offset` from the base position indicated by the specified `way` and return the resulting absolute position on success or pos&lowbar;type(&hyphen;1) on failure&period; Optionally specify `which` area of the stream buffer&period; The seek operation will fail if `which` does not include the flag `bsl&colon;&colon;ios&lowbar;base&colon;&colon;in` or if the resulting absolute position is less than zero or greater than the value returned by `length`&period;

== Return Value

resulting absolute position, or `pos&lowbar;type(&hyphen;1)` on failure

== Parameters

[cols="1,4"]
|===
| Name| Description
| *offset*
| relative offset from the base position
| *way*
| base position for the seek (`beg`, `cur`, or `end`)
| *which*
| areas of the stream buffer&semi; must include `in`
|===


[.small]#Created with https://www.mrdocs.com[MrDocs]#
