How would you get an input, and make it affect something?

You cannot use semicolon after public APawn because you have just told the compiler that you are going to define your own class called AMyPawn so you cannot stop there.

Try the following:

UCLASS()
class UNREALCPP_API AMyPawn : public APawn
{
    GENERATED_BODY()

  public:
    // rest of your code goes here
    // ...
    virtual void BeginPlay() override;
};