ABMOS in c++