How do I properly procedurally add components in C++?

Thank you! That makes much more sense than what I was doing. You should add your reply as an answer so I can mark it correct