Simple C++ Ball Hovering Example/Tutorial

Can someone guide me on how to make a simple sphere hover around in the world against gravity using only C++?

I have ave been trying to get it, but most tutorials as is either from older versions or involves some blueprints. I want to do it just with C++.

Thanks in advance.