programing:cpp_builder:cpp_builder-tstreamreader
差分
このページの2つのバージョン間の差分を表示します。
両方とも前のリビジョン前のリビジョン次のリビジョン | 前のリビジョン | ||
programing:cpp_builder:cpp_builder-tstreamreader [2020/02/04 17:26] – yoko | programing:cpp_builder:cpp_builder-tstreamreader [2020/02/04 17:30] (現在) – [コーディング例] yoko | ||
---|---|---|---|
行 1: | 行 1: | ||
TStreamReaderを使ったUTF-8のファイル読み込み | TStreamReaderを使ったUTF-8のファイル読み込み | ||
========================================== | ========================================== | ||
+ | C++Builderで、`fgetwc`関数ではうまくカナ文字などが読み込めなかったので `TStreamReader` 関数を利用した。 | ||
コーディング例 | コーディング例 | ||
行 6: | 行 7: | ||
<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); | ||
} | } |
programing/cpp_builder/cpp_builder-tstreamreader.1580804767.txt.gz · 最終更新: 2020/02/04 17:26 by yoko