← Back to team overview

dolfin team mailing list archive

Re: fstream with dolfin

 

Thanks guys, works fine, great.

Alex

Anders Logg wrote:

ofstream is in namespace std so std::ofstream should work.

/Anders


On Mon, Feb 27, 2006 at 12:01:13PM +0000, Alexander Jarosch wrote:
Hi,

I would like to write some array data from a dolfin program to a normal binary data file with fstream like:

#include <fstream>

ofstream fout("visc.dat", ios::binary);
fout.write((char *)(&data), sizeof(data));

but it does not work. is it not within the namespace of dolfin? error is that ofstream is not defined.

any suggestions how to do this easily?

thanks allot,

alex

_______________________________________________
DOLFIN-dev mailing list
DOLFIN-dev@xxxxxxxxxx
http://www.fenics.org/cgi-bin/mailman/listinfo/dolfin-dev




--
Alexander H. Jarosch

Jarðvísindastofnun Háskólans
Institute of Earth Sciences, University of Iceland
Náttúrufræðahús, Askja
Building of Natural Sciences, Askja
Sturlugata 7
IS - 101 Reykjavík
Iceland

Tel.: +354 525 4906
http://raunvis.hi.is/~jarosch/




References