common operations in cpp