📄 store.cpp
字号:
//------------------------------------
// store.cpp
// (c) Bartosz Milewski, 1994
//------------------------------------
#include "store.h"
#include "symtab.h"
#include <cmath>
#include <iostream>
using std::cout;
using std::endl;
Store::Store (int size, SymbolTable & symTab): _size (size)
{
_cell = new double [size];
_status = new unsigned char [size];
for (int i = 0; i < size; ++i)
_status [i] = stNotInit;
// add predefined constants
// Note: if more needed, do a more general job
cout << "e = " << exp (1) << endl;
int id = symTab.ForceAdd ("e", 1);
SetValue (id, exp (1));
cout << "pi = " << 2 * acos (0.0) << endl;
id = symTab.ForceAdd ("pi", 2);
SetValue (id, 2 * acos (0.0));
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -