parameter를 저장한 파일이 있습니다.
그 파일에는
a+b
c*d
pow( (double)e, (double)f )
와 같은 수식들이 저장되어있습니다.
이 수식들을 실행파일에서 그대로 가져다 쓰고 싶습니다.
어떻게 하면 될까요?
예를 들면 이런 거요...
Ex.cpp에서 A라는 변수 혹은 다른 어떤 것이든 선언하고
- main memory size
- number of registers
- stack size
- status bits - zero, carry
- ALU functions
- Memory access method - throght MAR, MDR and so on
- Instruction decoding, metheod
- Instruction - ADD, SUB
- Instruction formats
- Interrupt
- Simulator commands and environments - DOS or windows
template
class Bag{
T *array;
int capacity;
int top;
public:
Bag(int bagCapacity){
if(bagCapacity < 0) throw "Bag capacity must be >0";
capacity = bagCapacity;
array = new T[bagCapacity];
top = -1;
}
virtual ~Bag(){
delete[] array;
}