20 Oct
2003
20 Oct
'03
14:47
Stefan Hundhammer schrieb: [...]
Sorry, mißverständlich ausgedrückt - natürlich ofstream und nicht cout.
Siehe auch
http://www.cplusplus.com/doc/tutorial/tut6-1.html
Du wirst mit einem Iterator über den Vektor gehen müssen und jedes Element mit "<<" ins File ausgeben.
Habe ich jetzt mal folgendermaßen probiert:
vector<bool> rand_bits;
this->generate( rand_bits, n, N );
ofstream o_file( file.c_str(), ios::out|ios::trunc|ios::binary );
if( !o_file ) {
perror( "ofstream" );
exit( 1 );
}
o_file << n << N << rng_seed;
for( size_t i=0; i