27 Feb
2004
27 Feb
'04
2:50 p.m.
Hi! On Fri, 27 Feb 2004, Kai Ludwig wrote:
How can I get the string of a expression ? I saw a get_name() function for symbols but nothing similar for expressions.
#include<iostream> #include<sstream> #include<ginac/ginac.h> using namespace std; using namespace GiNaC; int main() { symbol x("x"); symbol y("y"); ex f=x*y; ostringstream o; o << f; string s=o.str(); cout << s << endl; return 0; } Bye, Chris Dams