What does the "class" keyword stand for?

Following this tutorial, I bumped into this keyword in the constructor of my custom gamemode:

//In FPSGameMode.cpp
AFPSGameMode::AFPSGameMode(const class FObjectInitializer& ObjectInitializer) : Super(ObjectInitializer)
{
}

On the other hand in the costructor prototype the “class” keyword disappear:

//In FPSGameMode.h
AFPSGameMode(const FObjectInitializer& ObjectInitializer);

Why? What’s the utility of this keyword?

Hi ,

Sometimes, you may have a situation when you need to use a class which is not defined yet. For example, class A should know about B, and class B should know about A.

class A;
class B;
class A
{
B* pB;
};
class B
{
A* pA;
};

This code is equivalent to that:

class A
{
class B* pB;
};
class B
{
class A* pA; // it is not necessary to use class keyword here cause class A has already defined
};

Best regards,