I’m not sure I fully understand what you want. The documentation for AddComponent is here for C++: AActor::AddComponent | Unreal Engine Documentation
If you’re still having troubles could you post an the code you have so far (or a similar example) so we can see what you already have and fix any easy errors? thanks