Return one number rand error

What is the problem with this code?
typedef ttmath::UInt<1024> BigInt;

BigInt xp;

xp=mod(rand();n);

where n is value passed as parameter.

return errors: expected')' before '; ' token
return errors: expected';' before ')' token

Thanks a lot

Added by: ~x, 2017 V 24

srand(time(0));
BigInt xp, r, n;

r = rand();
n = 100;
r.Div(n, xp);

std::cout << xp << std::endl;