@Tesu, note that he does augment the matrix with the RHS vector, see method solve_x() where he allocated C as N x N+1 and fills it up with values properly.
Also @Tesu, try not to post ready-made code. If the OP wanted to just pick a Gaussian elimination algorithm to copy-paste in his own code, he would have done so instead of posting a thread here, it's not hard to find simple algorithms with a simple Google search, but it takes the fun and learning out of doing it yourself. For instance, someone can download the source code for CLARAty and get all matrix numerical methods you can imagine, and much much more, in one shot, or I could give him my own extensive matrix numerical methods libraries.. But that's no fun.