Attaching (or picking up) objects to the crosshair of a FP character (C++)

I’m new to UE C++, and despite my past C++ knowledge, I have no idea how to create a simple pick up system!

I was wonder how one would be able to create an interaction system which allows materials to be picked up (if the crosshair is on the cbject) and kept center on the screen while maintaining the same position until dropped (similar to Skyrim, but without the object’s rotation)? I’ve learnt how to use inputs, allowing myself to interact with objects such as doors, but picking up objects is a goal of mine. Of course there are multiple Blueprint tutorials like this guy’s 2nd examples (UE4 - Tutorial - Grabbing Objects! - YouTube), but I would really love to learn how to impliment this in C++.

there is one not exactly what you want though:
https://www.ue4community.wiki/legacy/cpp-inventory-0z7lrwqv

I strongly recommend to also load the finished project: GitHub - Heite92/UE4_InventorySystem: C++ Inventory system for Unreal Engine 4

best regards, PEter