Basic Question about initialization

Hello

My question is a pretty basic one, I’m just a bit confused about the difference between

TSubclassOf<class ASpell*> spell;
TSubObjectOf<class ASpell*> spell;
ASpell* spell;

and how those work.

I have a class named Spell with an inheritance from Actor.

in my Character class, I want to have a item of that class, and modify his attributes (damage, range…etc).

so in C++ I usually would do something like that:

ASpell* spell = new ASpell();

spell->SetDamage();

But here in unreal, I read about doing something like:

TSubclassOf<class ASpell*> spellQ;
spellQ =  ASpell::StaticClass();
spellQ->SetDamage();

but that makes spellQ a Uclass item, that obviously can’t access to ASpell* functions.

Which way is the right one to create the item that I want? and how can I do it properly?

Thanks very much