My first cpp experience... There is implementation of m-sequence and retrieving a gold code. Try to use only bitwise operations.