Random C++ function I made