/*------------------------------------------------------------------------- | The software accompanies the paper | | | | Classes and Objects of Chemical Thermodynamics in Object-Oriented | | Programming. 2. A Class of Chemical Species | | | | E.B. Rudnyi | | E-mail: rudnyi@comp.chem.msu.su | | Homepages: http://www.chem.msu.su/~rudnyi/welcome.html | | | | presented at Second Electronic Computational Chemistry Conference, | | November 1995, http://hackberry.chem.niu.edu/ECCC2/ | --------------------------------------------------------------------------*/ #include #include #include "function.h" #include "memtst.h" void print_smpl_func(smpl_func& t) { if (t) cout << "function is " << endl << t << "; " << endl << "current errno " << t.errno << ", number of characters " << t.len() << endl << endl; else cout << "function is not determined" << endl << endl; } int main() { memory test; ifstream in("smplfunc.dat"); smpl_func a; in >> a; print_smpl_func(a); smpl_func b; in >> b; print_smpl_func(b); smpl_func c; in >> c; print_smpl_func(c); cout << "press RETURN to continue" << endl; cin.get(); cout << endl; global::p = 1.; double t; for (global::T = 500; global::T < 8001; global::T += 500) cout << setw(10) << global::T << setw(15) << a() << setw(15) << b() << setw(15) << c() << endl; cout << "press RETURN to continue" << endl; cin.get(); b = a; print_smpl_func(b); b.clear(); print_smpl_func(b); return 0; }