simple raw c++ buffer realization