C-style file input/output
Da cppreference.com
![]() |
This page has been machine-translated from the English version of the wiki using Google Translate.
The translation may contain errors and awkward wording. Hover over text to see the original version. You can help to fix errors and improve the translation. For instructions click here. |
O subconjunto CI / O do C + + biblioteca padrão implementa C-estilo fluxo de entrada / saída operações. O cabeçalho
<cstdio>
fornece suporte à operação genérica arquivo e funções de suprimentos com estreitas e multibyte caracteres de entrada / saída de recursos, eo cabeçalho <cwchar>
fornece funções com a entrada de caracteres de largura / capacidades de saída. Original:
The C I/O subset of the C++ standard library implements C-style stream input/output operations. The
<cstdio>
header provides generic file operation support and supplies functions with narrow and multibyte character input/output capabilities, and the <cwchar>
header provides functions with wide character input/output capabilities. The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Fluxos C são objetos de std::FILE tipo que só podem ser acessados e manipulados através de ponteiros da Nota tipo std::FILE* (: embora possa ser possível criar um objeto local de std::FILE tipo por dereferencing e copiar um FILE* válido, usando o endereço de tal cópia em as funções de I / O é um comportamento indefinido). Cada fluxo C está associada a um dispositivo externo físico (arquivo, fluxo de entrada padrão, impressora, porta serial, etc).
Original:
C streams are objects of type std::FILE that can only be accessed and manipulated through pointers of type std::FILE* (Note: while it may be possible to create a local object of type std::FILE by dereferencing and copying a valid FILE*, using the address of such copy in the I/O functions is undefined behavior). Each C stream is associated with an external physical device (file, standard input stream, printer, serial port, etc).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Fluxos C pode ser usado tanto para entrada como não formatado e formatado e saída. Eles são sensíveis à localidade e pode realizar amplas / multibyte conversões necessárias. Ao contrário de C + + riachos, onde cada fluxo está associado com a sua própria localidade, todos os fluxos de C acessar o objeto mesmo local: o mais recentemente instalado com std::setlocale.
Original:
C streams can be used for both unformatted and formatted input and output. They are locale-sensitive and may perform wide/multibyte conversions as necessary. Unlike C++ streams, where each stream is associated with its own locale, all C streams access the same locale object: the one most recently installed with std::setlocale.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
Além do sistema de informações específicas necessárias para acessar o dispositivo (por exemplo, um descritor de arquivo POSIX), cada objeto de fluxo de C tem o seguinte:
Original:
Besides the system-specific information necessary to access the device (e.g. a POSIX file descriptor), each C stream object holds the following:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
1)
Largura de caractere: estreita ou larga
Original:
Character width: narrow or wide
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
2)
Buffer estado: unbuffered, linha-tampão, com buffer.
Original:
Buffering state: unbuffered, line-buffered, fully buffered.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
3)
O tampão, o qual pode ser substituído por uma fonte externa, tampão fornecido pelo utilizador.
Original:
The buffer, which may be replaced by an external, user-provided buffer.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
4)
I / O modo: de entrada, de saída, ou de atualização (entrada e saída).
Original:
I/O mode: input, output, or update (both input and output).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
5)
Binário / indicador do modo texto.
Original:
Binary/text mode indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
6)
Fim-de-arquivo indicador de status.
Original:
End-of-file status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
7)
Indicador de status de erro.
Original:
Error status indicator.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.
8)
Indicador de posição do arquivo (um objeto do tipo std::fpos_t), que, para fluxos de caracteres de largura, inclui o estado parse (um objeto do tipo mbstate_t).
Original:
File position indicator (an object of type std::fpos_t), which, for wide character streams, includes the parse state (an object of type mbstate_t).
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
You can help to correct and verify the translation. Click here for instructions.