Barrage machine written in c++