[GiNaC-list] writing symbols and expressions into binary files

Alexei Sheplyakov alexei.sheplyakov at gmail.com
Sun Jun 6 15:31:34 CEST 2010


Hello,

On Fri, Jun 04, 2010 at 06:05:26PM -0400, Cristobal Navarro wrote:
> is it possible to write ginac symbols and expressions into a file as binary
> format??

Yes. It's documented in the manual (section 5.15.4, titled as `Archiving').

> i've tried this but i get segmentation fault when printing the read
> variables. you can try this one file example to see the problem.

That code is not going to work (with any non-POD data type). Perhaps you
should read something about serialization. A good starting point is
http://www.parashift.com/c++-faq-lite/serialization.html

Best regards,
	Alexei



More information about the GiNaC-list mailing list