Free market simulation in C++