Espacios de nombres
Variantes
Acciones

std::basic_ostream::tellp

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

 
 
Entrada / salida de la biblioteca
I / O manipuladores
C-estilo I / O
Buffers
Original:
Buffers
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
(obsoleto)
Arroyos
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Abstracciones
Original:
Abstractions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
File 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.
Cadena de 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.
Matriz 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.
(obsoleto)
(obsoleto)
(obsoleto)
Tipos
Original:
Types
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Error interfaz categoría
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.
(C++11)
 
std::basic_ostream
Los objetos globales
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.
Las funciones miembro
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.
Entrada con formato
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.
Entrada sin formato
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.
Posicionamiento
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
Varios
Original:
Miscellaneous
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Clases de miembros
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.
Terceros funciones
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.
 
pos_type tellp();
Devuelve el indicador de posición de salida del objeto streambuf corriente asociada .
Original:
Returns 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.
En primer lugar, construye un objeto sentry que controla el flujo de los errores y los colores de la corbata () 'd flujos de salida (desde C++11). Después, si fail()==true, devuelve pos_type(-1). De lo contrario, devuelve rdbuf()->pubseekoff(0, std::ios_base::cur, std::ios_base::out) .
Original:
First, constructs a sentry object which checks the stream for errors and flushes the tie()'d output streams (desde C++11). Afterwards, if fail()==true, returns pos_type(-1). Otherwise, returns rdbuf()->pubseekoff(0, std::ios_base::cur, std::ios_base::out).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Contenido

[editar] Parámetros

(Ninguno)
Original:
(none)
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Valor de retorno

Indicador de posición de salida de corriente en caso de éxito, pos_type(-1) si se produce un error .
Original:
current output position indicator on success, pos_type(-1) if a failure occurs.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Ejemplo

#include <iostream>
#include <sstream>
int main()
{
    std::ostringstream s;
    std::cout << s.tellp() << '\n';
    s << 'h';
    std::cout << s.tellp() << '\n';
    s << "ello, world ";
    std::cout << s.tellp() << '\n';
    s << 3.14 << '\n';
    std::cout << s.tellp() << '\n' << s.str();
}

Salida:

0
1
13
18
hello, world 3.14

[editar] Ver también

establece el indicador de posición de salida
Original:
sets 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.

(función miembro público) [editar]
devuelve el indicador de posición de entrada
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.

(función miembro público de std::basic_istream) [editar]
sets the input position indicator
(función miembro público de std::basic_istream) [editar]