Added c++ version prototype for N(n, r, p).