Win32API質問箱 Build44
レス数が950を超えています。1000を超えると書き込みができなくなります。
0951デフォルトの名無しさん
2006/08/18(金) 10:27:03#include <windows.h>
#include <iostream.h>
#include <fstream.h>
int WINAPI WinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
LPSTR lpsCmdLine, int nCmdShow)
{
char buf[512];
// ifstreamのインスタンスを作る
// C言語のfopenと同じ
ifstream ifs( "input.txt" ) ;
// ofstreamのインスタンスを作る
// C言語のfopenと同じ
ofstream ofs( "output.txt" ) ;
// ifstreamのインスタンス(ifs)から1行読み込みbufに入れる。
while( ifs.getline( buf, sizeof(buf) ))
// ofstreamのインスタンス(ofs)を利用して読み込んだ内容を書き込む
ofs << buf << endl;
return 0;
}
レス数が950を超えています。1000を超えると書き込みができなくなります。