How to step-by-step do mechanics of selecting units in C++?

Hi Community,

I would like to learn some C++ in Unreal Engine 4 by making it a simple Real-Time Strategy game, because RTS game included many mechanics related to each element such as camera, movement of units, UI and AI. And I have problem with selecting units. :frowning:

Can someone explain to me how to step-by-step do mechanics of selecting units in C++?
So how to do to draw a selection box with the mouse and units in this box will change status to “active”?
Or how to do a single selection of the unit with the cursor? :confused:

I’m only interested in solutions in C++ :slight_smile:

http://shootertutorial.com/2016/03/27/rts-camera-and-unit-movement/https://youtube.com/watch?v=kcsF2U84Jhk
You can reproduce the blueprint solution in c++ fairly easily.