Shamir's Secret Sharing in C++