Working on c++ bytebuffer class