File tree Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Expand file tree Collapse file tree 3 files changed +41
-2
lines changed Original file line number Diff line number Diff line change 5252| ` vfscanf ` | 可変引数リスト` va_list ` を使用し、書式を指定してファイルから入力する | C++17 |
5353| [ ` fgetc ` ] ( /reference/cstdio/fgetc.md ) | ファイルから1文字入力する | |
5454| [ ` fgets ` ] ( /reference/cstdio/fgets.md ) | ファイルからN文字入力する | |
55- | ` fputc ` | ファイルに1文字出力する | |
55+ | [ ` fputc ` ] ( /reference/cstdio/fputc.md ) | ファイルに1文字出力する | |
5656| ` fputs ` | ファイルにN文字出力する | |
5757| ` fread ` | ファイルからN文字読み込む | |
5858| ` fwrite ` | ファイルにN文字書き込む | |
Original file line number Diff line number Diff line change 1+ # fputc
2+ * cstdio[ meta header]
3+ * std[ meta namespace]
4+ * function[ meta id-type]
5+
6+ ``` cpp
7+ int fputc ( int ch, FILE* stream );
8+ ```
9+
10+ ## 概要
11+ 指定されたファイルストリームに1文字出力する。
12+
13+ [`putc`][/reference/cstdio/putc.md.nolink]とは違い、関数として定義することが定められているため、引数は一度しか評価されないことが保証されている。
14+
15+ ## 戻り値
16+ 出力された文字を返す。
17+
18+ 失敗した場合、[`EOF`](/reference/cstdio/eof.md)を返す。
19+
20+ ## 例
21+ ```cpp example
22+ #include <cstdio>
23+
24+ int main() {
25+ fputc('a', stdout);
26+ }
27+ ```
28+ * fputc[ color ff0000]
29+ * stdout[ link /reference/cstdio/stdout.md]
30+
31+ ### 出力
32+ ```
33+ a
34+ ```
35+
36+ ## 処理系
37+ - [ Clang] ( /implementation.md#clang ) : ??
38+ - [ GCC] ( /implementation.md#gcc ) : ??
39+ - [ Visual C++] ( /implementation.md#visual_cpp ) : ??
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ static bool sync_with_stdio(bool sync = true);
2525## 備考
2626標準ストリーム `str` が C 言語ライブラリの標準ストリーム `f` と同期している場合、
2727
28- - 文字 `c` のストリームへの出力 [`fputc`](../../cstdio/fputc.md.nolink )`(f, c);` は `str.`[`rdbuf`](../basic_ios/rdbuf.md)`()->`[`sputc`](../../streambuf/basic_streambuf/sputc.md)`(c);` と等価であり、
28+ - 文字 `c` のストリームへの出力 [`fputc`](../../cstdio/fputc.md)`(f, c);` は `str.`[`rdbuf`](../basic_ios/rdbuf.md)`()->`[`sputc`](../../streambuf/basic_streambuf/sputc.md)`(c);` と等価であり、
2929- 文字 `c` のストリームからの入力 `c =` [`fgetc`](../../cstdio/fgetc.md)`(f);` は `c = str.`[`rdbuf`](../basic_ios/rdbuf.md)`()->`[`sbumpc`](../../streambuf/basic_streambuf/sbumpc.md)`();` と等価であり、
3030- 文字 `c` のストリームへの戻し [`ungetc`](../../cstdio/ungetc.md.nolink)`(c, f)` は `str.`[`rdbuf`](../basic_ios/rdbuf.md)`()->`[`sputbackc`](../../streambuf/basic_streambuf/sputbackc.md)`(c);` と等価である。
3131
You can’t perform that action at this time.
0 commit comments