Namensräume
Varianten

std::basic_ostream::seekp

Aus cppreference.com
< cpp‎ | io‎ | basic ostream

 
 
Input / Output-Bibliothek
I / O-Manipulatoren
C-style I / O
Puffern
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_streambuf
basic_filebuf
basic_stringbuf
strstreambuf(veraltet)
Streams
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstraktionen
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ios_base
basic_ios
basic_istream
basic_ostream
basic_iostream
Datei-I / O
Original:
File I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ifstream
basic_ofstream
basic_fstream
String I / O
Original:
String I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_istringstream
basic_ostringstream
basic_stringstream
Array I / O
Original:
Array I/O
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
istrstream(veraltet)
ostrstream(veraltet)
strstream(veraltet)
Types
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
streamoff
streamsize
fpos
Fehler Kategorie Schnittstelle
Original:
Error category interface
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
iostream_category(C++11)
io_errc(C++11)
 
std::basic_ostream
Globale Objekte
Original:
Global objects
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Member-Funktionen
Original:
Member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::basic_ostream
basic_ostream::~basic_ostream
basic_ostream::operator=(C++11)
Formatierte Eingabe
Original:
Formatted input
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::operator<<
Unformatierte Eingabe
Original:
Unformatted input
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::put
basic_ostream::write
Positionierung
Original:
Positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::tellp
basic_ostream::seekp
Verschiedenes
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::flush
basic_ostream::swap(C++11)
Mitglied Klassen
Original:
Member classes
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_ostream::sentry
Non-Member-Funktionen
Original:
Non-member functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
operator<<(std::basic_ostream)
 
basic_ostream& seekp( pos_type pos );
(1)
basic_ostream& seekp( off_type off, std::ios_base::seekdir dir);
(2)
Legt die Ausgangsposition Indikator für die aktuelle zugehörigen streambuf Objekt .
Original:
Sets the output position indicator of the current associated streambuf object.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Zunächst baut eine sentry Objekt, das den Strom für Fehler und spült die tie () 'd Output-Streams prüft. (seit C++11) Danach
Original:
First, constructs a sentry object which checks the stream for errors and flushes the tie()'d output streams. (seit C++11) Afterwards,
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
1)
setzt den Ausgang Stellungsanzeige um absolut (bezogen auf den Anfang der Datei) Wert pos durch Aufrufen rdbuf()->pubseekoff(pos, std::ios_base::out). Wenn der Aufruf zurückkehrt (pos_type)-1 führt setstate(failbit) .
Original:
sets the output position indicator to absolute (relative to the beginning of the file) value pos by calling rdbuf()->pubseekoff(pos, std::ios_base::out). If the call returns (pos_type)-1, executes setstate(failbit).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
setzt den Ausgang Stellungsanzeige off gegenüber dir indem rdbuf()->pubseekoff(off, dir, std::ios_base::out) ausgeglichen. Meldet keine Fehler .
Original:
sets the output position indicator to offset off relative to dir by calling rdbuf()->pubseekoff(off, dir, std::ios_base::out). Does not report errors.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Inhaltsverzeichnis

[Bearbeiten]Parameter

pos -
Absolutposition um den Ausgang Lagemelder eingestellt .
Original:
absolute position to set the output position indicator to.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
off -
relative Position, um die Ausgabe Lagemelder eingestellt .
Original:
relative position to set the output position indicator to.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
dir -
definiert Grundposition den relativen Offset zu bewerben. Es kann eine der folgenden Konstanten sein:
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
beg
der Beginn einer Stream
Original:
the beginning of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
end
das Ende eines Streams
Original:
the ending of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cur
die aktuelle Position des Stroms Stellungsanzeige
Original:
the current position of stream position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
defines base position to apply the relative offset to. It can be one of the following constants:
Constant
Original:
Constant
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Explanation
beg
der Beginn einer Stream
Original:
the beginning of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
end
das Ende eines Streams
Original:
the ending of a stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
cur
die aktuelle Position des Stroms Stellungsanzeige
Original:
the current position of stream position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Rückgabewert

*this

[Bearbeiten]Ausnahmen

1)
Kann std::ios_base::failure im Falle des Scheiterns zu werfen, wenn exceptions()& failbit !=0 .
Original:
May throw std::ios_base::failure in case of failure, if exceptions()& failbit !=0.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
2)
Nicht werfen, wenn rdbuf()->pubseekoff() wirft
Original:
Does not throw unless rdbuf()->pubseekoff() throws
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[Bearbeiten]Beispiel

#include <sstream>#include <iostream>   int main(){std::ostringstream os("hello, world"); os.seekp(7); os <<'W'; os.seekp(0, std::ios_base::end); os <<'!'; os.seekp(0); os <<'H';std::cout<< os.str()<<'\n';}

Output:

Hello, World!

[Bearbeiten]Siehe auch

gibt die Ausgabe Stellungsanzeige
Original:
returns the output position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(öffentliche Elementfunktion)[edit]
liefert den Eingang Stellungsanzeige
Original:
returns the input position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(öffentliche Elementfunktion of std::basic_istream)[edit]
sets the input position indicator
(öffentliche Elementfunktion of std::basic_istream)[edit]
close