Error with Player Controller Class

SetupInputComponent() has no arguments, so replace your code:

void AMainCharacterController::::SetupInputComponent()
{
	Super::SetupInputComponent();

	if (UEnhancedInputComponent* EnhancedInputComponent = Cast<UEnhancedInputComponent>(InputComponent))
	{ 
         ...
    }
}