Simple naive oscillators in C++