ゲームが作れるようになるまでがんばる日記

ゲーム制作のことを中心にゲームに関することを書いています

2009-03-01から1日間の記事一覧

バイナリファイルの出力

C++

バイナリファイルを出力するには、ofstreamを使えばよい。コンストラクタの第2引数にifstream::binaryを付けてストリームを作成し、write()を使う。 プログラムは次の通り。 #include <iostream> #include <fstream> using namespace std; bool writeFile( const char* name, co</fstream></iostream>…