LoginSignup
1
2

More than 5 years have passed since last update.

c++ builder > バイナリファイル読込み > TFileStream使用 > fs->Read(buf,4);

Last updated at Posted at 2015-08-19
動作確認
C++ Builder XE4

参考
http://www.geocities.co.jp/SiliconValley/6071/technic/29.html

上記をもとに作成。4バイト読込む例

    if (FileExists(filename) == false) {
        return false;
    }

    TFileStream *fs;

    try {
        fs = new TFileStream(filename, fmOpenRead);
    } catch (...) {
    }

    char buf[20] = {0};

    fs->Read(buf, 4);

    delete fs;
    fs = NULL;

    int nop=1;
1
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
2