Espaços nominais
Variantes
Acções

std::fseek

Da cppreference.com
< cpp‎ | io‎ | c

 
 
De entrada / saída 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.
Abstrações
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)
 
C estilo de I / O
Funções
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Arquivo de acesso
Original:
File access
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Directa de entrada / saída
Original:
Direct input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Não formatado entrada / saída
Original:
Unformatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Formatado de entrada / saída
Original:
Formatted input/output
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Arquivo de posicionamento
Original:
File positioning
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
fseek
De tratamento de erros
Original:
Error handling
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Operações em arquivos
Original:
Operations on files
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
 
Definido no cabeçalho <cstdio>
int fseek( std::FILE* stream, long offset, int origin );
Define o indicador de posição de arquivo do fluxo stream arquivo da seguinte maneira:
Original:
Sets the file position indicator for the file stream stream as follows:
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o stream está aberto no modo binário, a nova posição é exactamente medidos offset bytes a partir do início do processo é origin SEEK_SET é, a partir da posição actual ficheiro se origin é SEEK_CUR e, a partir do final do ficheiro, se é origin SEEK_END. Alguns fluxos binários podem não suportar a SEEK_END.
Original:
If the stream is open in binary mode, the new position is exactly offset bytes measured from the beginning of the file is origin is SEEK_SET, from the current file position if origin is SEEK_CUR, and from the end of the file if origin is SEEK_END. Some binary streams may not support the SEEK_END.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se o stream está aberto em modo texto, os valores só são suportados para offset zero (que funciona com qualquer origin) e um valor retornado por uma chamada anterior para std::ftell em um fluxo associado com o mesmo arquivo (que só funciona com origin de SEEK_SET.
Original:
If the stream is open in text mode, the only supported values for offset are zero (which works with any origin) and a value returned by an earlier call to std::ftell on a stream associated with the same file (which only works with origin of SEEK_SET.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Além de mudar o indicador de posição do arquivo, fseek desfaz os efeitos da std::ungetc e limpa o fim do estatuto de arquivo, se for o caso.
Original:
In addition to changing the file position indicator, fseek undoes the effects of std::ungetc and clears the end-of-file status, if applicable.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
Se uma leitura ou escrita de erro ocorre, o indicador de erro para o fluxo ( std::ferror) é definida a posição do arquivo e não é afetado.
Original:
If a read or write error occurs, the error indicator for the stream (std::ferror) is set and the file position is unaffected.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

Índice

[editar] Parâmetros

stream -
arquivo de fluxo de modificar
Original:
file stream to modify
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
offset -
número de caracteres a deslocar a posição relativa à origem
Original:
number of characters to shift the position relative to origin
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
origin -
posição para a qual offset é adicionado. Ele pode ter um dos seguintes valores: SEEK_SET, SEEK_CUR, SEEK_END
Original:
position to which offset is added. It can have one of the following values: SEEK_SET, SEEK_CUR, SEEK_END
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

0 no sucesso valor diferente de zero, caso contrário.
Original:
0 upon success, nonzero value otherwise.
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

[editar] Exemplo

[editar] Veja também

move o indicador de posição de arquivo para um local específico em um arquivo
Original:
moves the file position indicator to a specific location in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
fica o indicador de posição de arquivo
Original:
gets the file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
retorna o indicador de posição de arquivo atual
Original:
returns the current file position indicator
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
move o indicador de posição do arquivo para o início em um arquivo
Original:
moves the file position indicator to the beginning in a file
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.

(função) [edit]
Documentação C para fseek