Simplest Cache Simulation written by C++