c++ - what does class pointer* means? -


i learning coding c++ in unreal engine, got syntax don't get:

class uspherecomponent* proxsphere; 

i think means create class, class pointer?

but result create object called proxsphere existing class uspherecomponent.

could explain how syntax means , it's usage?

class someotherclass; has not been defined yet class helloworld {     someotherclass* my_pointer; };  or alternative:  class helloworld {     class someotherclass* my_pointer; }; 

the first 1 correct if have multiple pointers (or references) such class has not been defined yet.

the second better? (i don't know) if need once, otherwise doing

class helloworld {     class someotherclass* my_pointer;     class someotherclass* my_pointer2;     class someotherclass* my_pointer3;      void func(class someotherclass* my_pointer, class someotherclass& my_ref); }; 

may not best.


Comments

Popular posts from this blog

routing - AngularJS State management ->load multiple states in one page -

python - GRASS parser() error -

Swift game error message -