Source of testMemoryCell_2files.cpp


  1: //testMemoryCell_2file.cpp

  3: #include <iostream>
  4: #include <string>

  6: using namespace std;

  8: #include "memorycell.h"

 10: void main(void)
 11: {
 12:     MemoryCell<int>    mc1;
 13:     MemoryCell<string> mc2("hello");

 15:     mc1.write(37);
 16:     mc2.write(mc2.read() + " world");
 17:     cout << mc1.read() << endl << mc2.read() << endl;
 18: }