名前空間
変種
操作

std::fseek

提供: cppreference.com
< cpp‎ | io‎ | c

 
 
入力/出力ライブラリ
I / Oのマニピュレータ
CスタイルのI / O
バッファ
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(廃止予定)
ストリーム
Original:
Streams
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
抽象化
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
ファイル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
文字列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
アレイの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(廃止予定)
ostrstream(廃止予定)
strstream(廃止予定)
タイプ
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
エラーカテゴリインターフェース
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)
 
CスタイルのI / O
機能します
Original:
Functions
The text has been machine-translated via Google Translate.
You can help to correct and verify the translation. Click here for instructions.
ファイルアクセス
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.
直接入力/出力
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.
fread
fwrite
書式なし入力/出力
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.
書式付き入力/出力
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.
ファイル位置付け
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.
ftell
fgetpos
fseek
fsetpos
rewind
エラー処理
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.
clearerr
feof
ferror
perror
ファイルに対する操作
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.
remove
rename
tmpfile
tmpnam
 
Defined in header <cstdio>
int fseek( std::FILE* stream, long offset, int origin );
次のようにファイルストリームstreamのファイル位置指示子を設定します
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.
streamは、バイナリモードで開いている場合は、新しい位置が正確にoffsetファイルの先頭から測定されたバイトがoriginSEEK_SET、とorigin場合、ファイルの末尾からSEEK_CURである場合originは、現在のファイル位置から、SEEK_ENDです。いくつかのバイナリストリームは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.
streamがテキストモードで開いている場合は、offsetに対してのみサポートされている値は、ゼロ(任意originで動作する)とのみstd::ftelloriginのと連動し、同じファイル(関連付けられているストリームに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.
ファイル位置指示子の変更に加えて、fseekstd::ungetcの効果を元に戻しますと、ファイルの終わり状態をクリアし、該当する場合.
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.
エラーが発生した読み取りまたは書き込みをした場合、ストリーム(std::ferror)のエラーインジケータが設定され、ファイル位置は影響を受けません
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.

目次

[編集] パラメータ

stream -
変更するには、ストリームをファイルしてください
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 -
原点からの相対位置をシフトする文字数
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 -
offsetが付加された位置。それは、次のいずれかの値を持つことができます:SEEK_SETSEEK_CURSEEK_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.

[編集] 値を返します

さもなければ0成功時には、ゼロ以外の値.
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.

[編集]

[編集] も参照してください

ファイル位置指示子は、ファイル内の特定の場所に移動します
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.

(関数) [edit]
ファイル位置指示子を取得します
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.

(関数) [edit]
現在のファイル位置指示子を返します
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.

(関数) [edit]
ファイル位置指示子は、ファイル内の先頭に移動します
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.

(関数) [edit]
C documentation for fseek