Collection of useful c, c++ function