27 Feb
2004
27 Feb
'04
4:07 p.m.
Hi, there seems to be a problem with the stl set container: int main() { GiNaC::symbol u1( "A" ); GiNaC::symbol u2( "B" ); std::set<GiNaC::symbol> spec; spec.insert(u1); spec.insert(u2); spec.insert(u3); std::set<GiNaC::symbol>::const_iterator s1 = spec.find(u1); // s2 still points to u1 ! std::set<GiNaC::symbol>::const_iterator s2 = spec.find(u2); GiNaC::ex f = pow((*s1),2) + (*s2) + 200*(*s1); std::cout << "f= " << f << std::endl; } Kai -- http://echempp.sourceforge.net Kai Ludwig Institut für Organische Chemie Auf der Morgenstelle 18 72076 Tübingen Tel.: 07071/29-73049 Mail: kai.ludwig@uni-tuebingen.de