programing:cpp_builder:cpp_builder-tstreamreader
差分
このページの2つのバージョン間の差分を表示します。
| 次のリビジョン | 前のリビジョン | ||
| programing:cpp_builder:cpp_builder-tstreamreader [2020/02/04 17:25] – 作成 yoko | programing:cpp_builder:cpp_builder-tstreamreader [2026/07/28 13:16] (現在) – 外部編集 127.0.0.1 | ||
|---|---|---|---|
| 行 1: | 行 1: | ||
| - | TStreamReaderを使ったUTF-8のファイルを読み込み | + | ====== |
| - | ============================================ | + | C++Builderで、`fgetwc`関数ではうまくカナ文字などが読み込めなかったので `TStreamReader` 関数を利用した。 |
| - | コーディング例 | + | ===== コーディング例 |
| - | ------------- | + | |
| <code c> | <code c> | ||
| - | String fname = L"" | + | String fname = L" |
| TStreamReader* fs = new TStreamReader(fname, | TStreamReader* fs = new TStreamReader(fname, | ||
| while (fs-> | while (fs-> | ||
| { | { | ||
| - | | + | |
| ShowMessage(s); | ShowMessage(s); | ||
| } | } | ||
| 行 17: | 行 16: | ||
| </ | </ | ||
| - | 参考 | + | ===== 参考 |
| - | ---- | + | |
| - | 1. [[https:// | + | - [[https:// |
programing/cpp_builder/cpp_builder-tstreamreader.1580804727.txt.gz · 最終更新: by yoko
