How 2 make player's pawn do dash in c++?

If you can’t manually translate a blueprint example into C++ then you should probably stick with blueprints, particularly because you said you’re new to UE4 and this is your first game. Don’t make life difficult for yourself!

If you still want to get started with C++ in UE4, you should definitely have done the introduction tutorial here:

If it proves too much, blueprints are not inferior - in fact they are much better for rapid prototyping.

Good luck!