random code in C++