[ Web Proxy ]
URL:
Viewing: http://pt.cppreference.com/cpp/io/basic_stringstream/basic_stringstream [Back]  [Original]

std::basic_stringstream::basic_stringstream - cppreference.com
cppreference.com
Espaos nominais
Variantes

std::basic_stringstream::basic_stringstream

De cppreference.com

<metanoindex/>

 
 
De entrada / sada da biblioteca
I / O manipuladores
C estilo de 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.
(obsoleta)
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.
Abstraes
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.
Cordas 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 de 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.
(obsoleta)
(obsoleta)
(obsoleta)
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.
Interface de categoria de erro
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_stringstream
Funes de membro
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_stringstream::basic_stringstream
basic_stringstream::operator=
basic_stringstream::swap
basic_stringstream::rdbuf
Seqncia de operaes
Original:
String operations
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
basic_stringstream::str
 
<tbody> </tbody>
basic_stringstream( ios_base::openmode mode = ios_base::in|ios_base::out );
(1)
basic_stringstream( const std::basic_string<CharT,Traits,Allocator>& str, {{#pad:|18}} ios_base::openmode mode = ios_base::in|ios_base::out );
(2)
basic_stringstream( basic_stringstream&& other );
(3) (desde C++11)
Constri fluxo nova cadeia.
Original:
Constructs new string stream.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

1)

Constri dispositivo nova cadeia subjacente. O objecto subjacente basic_stringbuf construdo como basic_stringbuf<Char,Traits,Allocator>(mode).
Original:
Constructs new underlying string device. The underlying basic_stringbuf object is constructed as basic_stringbuf<Char,Traits,Allocator>(mode).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

2)

Usa uma cpia de str como contedo inicial do dispositivo de cordo subjacente. O objecto subjacente basic_stringbuf construdo como basic_stringbuf<Char,Traits,Allocator>(str, mode).
Original:
Uses a copy of str as initial contents of the underlying string device. The underlying basic_stringbuf object is constructed as basic_stringbuf<Char,Traits,Allocator>(str, mode).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

3)

Mova construtor. Constri o fluxo de arquivos com o estado de other usando semntica mover.
Original:
Move constructor. Constructs the file stream with the state of other using move semantics.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Parmetros

str -
string para usar como contedo inicial do fluxo de seqncia
Original:
string to use as initial contents of the string stream
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
mode -
especifica o modo de fluxo aberto. Ele o tipo de mscara de bits, as seguintes constantes so definidas:
Constante
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
app
procurar o fim do fluxo antes de cada gravao
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
abrir em modo binrio
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
Abrir para leitura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
abrir para escrita
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
descartar o contedo da corrente durante a abertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
procurar o fim do fluxo imediatamente depois de aberto
Original:
seek to the end of stream immediately after open
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Original:
specifies stream open mode. It is bitmask type, the following constants are defined:
Constante
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
app
procurar o fim do fluxo antes de cada gravao
Original:
seek to the end of stream before each write
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
binary
abrir em modo binrio
Original:
open in binary mode
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
in
Abrir para leitura
Original:
open for reading
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
out
abrir para escrita
Original:
open for writing
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
trunc
descartar o contedo da corrente durante a abertura
Original:
discard the contents of the stream when opening
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ate
procurar o fim do fluxo imediatamente depois de aberto
Original:
seek to the end of stream immediately after open
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.
other -
outro fluxo string para usar como fonte
Original:
another string stream to use as source
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Exemplo

#include <iostream>
#include <sstream>
int main()
{
    // default constructor (input/output stream)
    std::stringstream buf1;
    buf1 << 7;
    int n = 0;
    buf1 >> n;
    std::cout << "buf1 = " << buf1.str() << " n = " << n << '\n';

    // input stream
    std::istringstream inbuf("-10");
    inbuf >> n;
    std::cout << "n = " << n << '\n';

    // output stream in append mode (C++11)
    std::ostringstream buf2("test", std::ios_base::ate);
    buf2 << '1';
    std::cout << buf2.str() << '\n';
}

Sada:

buf1 = 7 n = 7
n = -10
test1

Veja tambm

Obtm ou define o contedo do objeto subjacente corda dispositivo
Original:
gets or sets the contents of underlying string device object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(funo pblica membro) [edit]
constri um objeto basic_stringbuf
Original:
constructs a basic_stringbuf object
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(of std::basic_stringbuf funo pblica membro) [edit]

Web Proxy Viewer  |  New URL  |  Original Page