- 192 名前:デフォルトの名無しさん mailto:sage [2007/12/11(火) 14:30:45 ]
- サンクス 出来ました
#include <iostream> #include <fstream> #include <string> using namespace std; main(){ string s="this a pan.", t; fstream fp; fp.open("stringdat", ios::out | ios::binary ); fp.write( (char*) &s, sizeof(s)); fp.close(); fp.open("stringdat", ios::in | ios::binary ); fp.read( (char*) &t, sizeof(s));; fp.close(); cout<<t;}
|

|