C++ implementation of convolutional coding