what is 'class' in 'class DataType* Variable' in Unreal Engine Shooter Game Sample

后端 未结 3 595
栀梦
栀梦 2021-01-04 10:07

I recently downloaded the Shooter Game for Unreal 4 Engine and I am just trying to pick apart the c++ but my c++ isn\'t the best I notice a variable called

c         


        
3条回答
  •  梦毁少年i
    2021-01-04 10:57

    That's so called "forward declaration".

    It allows you to specify a pointer to a class/struct name so that you don't have to include the particular header file defining that class/struct.

    This feature is particularly viable when breaking circular dependencies between header files.

    You can verify that this is the case by checking that AShooterCharacter is not defined in any files included by ShooterWeapon.h.

提交回复
热议问题