DefaultPawn, how can i create using c++?

So i am doing a course on Udemy with Ben Tristem, i am at the chapter two where he creates a Escape game.
In this course he uses blueprint to create the default pawn since we couldnt choose the default pawn in the c++ game, for me that doesnt interest me at all since i am studying computer science and i am experimenting the engine so i can use my c++ skills and improve!

So do you guys have a link or some tutorial how it is done?

As you can see in my picture defaultPawn class cant be chosen, that is my problem!

That’s because “GameModeBase” is a C++ class,and you cannot modify it directly in the editor (there is a UPROPERTY editanywhere before DefaultPawnClass in the code of “GameModeBase.h” which indicate you can modify it in the editor, but if you want to modify it, you have to first derive a blueprint class from it. Maybe this isn’t an exact answer, it’s my experience, I am also a beginner ). If you click the “+” button on the right of it and derive a blueprint class from it then you can choose the default pawn class. You can always create your class with C++ and derive a blueprint from it at the last step in the editor, if you change your code in the visual studio, the blueprint will also change automatically, this wouldn’t be a big trouble.