some coding challenges with cpp