InputComponent->BindAction(“Sprint”), IE_Pressed, this, &APawnWithCamera::SprintBegin);
InputComponent->BindAction(“Sprint”), IE_Released, this, &APawnWithCamera::SprintEnd);
There’re two red lines under ‘->’ respectively and the compiler warns that:
And my project settings look like this:

