Confused about the strange usage of pointers

so i was watching a tutorial, and the guy in the tutorial used pointers in quite a strange way.

for some reason they created a UStaticMeshComponent pointer called. SM_MyMesh

“UStaticMeshComponent* SM_MyMesh;”

but for some reason when they initialized the pointer they did not include &,
this is confusing, where i learned C++ i was told that i had to use & to initialize a pointer.

then again i am quite rusty, its been awhile sense the last time i did something with C++, mainly due to a lack of motivation.

In C++, & (as unary, i.e. “&var”) is the referencing operator (different from the binary “bitwise and”, i.e. “var1 & var2”).
The referencing operator returns a pointer to the variable. So you can initialize pointers by getting pointers with &, but it is not the only way.
Specifically, in UE4, UClasses (like UStaticMeshComponent) are memory-managed and garbage-collected, so they should be initialized in ways such as:

UObjectType* object = NewObject<UObjectType>(parent, UObjectType::StaticClass());  

Pointer and reference stuff can be a bit tricky and error prone if you don’t know what you are doing: I would recommend reviewing some C++ pointers tutorial (plus, refreshing knowledge is always useful ;P).