Get Component in C++

So I’ll have to create the component inside of the C++ class so that I can store it in a variable?