/*------------------------------------------------------------------------- | 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_function(function& t) { if (t) cout << "function is " << endl << t << endl << "current errno " << t.errno << ", number of characters " << t.len() << endl << "number of simple functions is " << t.nfunc() << endl << endl; else cout << "function is not determined" << endl << endl; } int main() { memory test; ifstream in("functn1.dat"); function a; in >> a; print_function(a); cout << "press RETURN to continue" << endl; cin.get(); cout << endl; global::p = 1.; for (global::T = 500; global::T < 8001; global::T += 500) cout << setw(10) << global::T << setw(15) << a() << endl; cout << "press RETURN to continue" << endl; cin.get(); function b; print_function(b); b = a; print_function(b); a.clear(); print_function(a); return 0; }