How to ratate the static mesh by C++?

I have made a blueprint to ratate some static meshes as the picture shows. But how to achieve this function by C++?