www.pudn.com > calc5.zip > Store.cpp


//------------------------------------ 
//  store.cpp 
//  (c) Bartosz Milewski, 1994 
//------------------------------------ 
 
#include "store.h" 
#include "symtab.h" 
#include  
#include  
using std::cerr; 
using std::endl; 
 
Store::Store (SymbolTable & symTab) 
{ 
    // add predefined constants 
    // Note: if more needed, do a more general job 
    cerr << "e = " << exp (1) << endl; 
    int id = symTab.ForceAdd ("e"); 
    AddValue (id, exp (1)); 
    cerr << "pi = " << 2 * acos (0.0) << endl; 
    id = symTab.ForceAdd ("pi"); 
    AddValue (id, 2 * acos (0.0)); 
}