You can't code directly in C++. However, there are 2 ways of using C++ in Godot:
1. Custom modules.
As writing custom modules is meant for adding functionality to the engine hence it's advanced, the most fit way to code game play would be GDNative in the form of a library.
So, here's the workflow with GDNative:
You write your cpp/h files in an external IDE (like MSVS). The cpp has additionally code for registering classes and methods to be used in Godot.
Build them into dll's (Windows) / so's (Linux). To do this you have to download
cpp bindings and Godot headers.
In Godot you create a GDNativeLibrary (on disk it has gdnlib extension).
In Godot you create a NativeScript (on disk it has gdns extension). This has to be based on the gdnlib above.
In the node you want the C++ functionality, you create a regular GDScript and you call the registered methods from within there, like you'd call methods from any dll native library.
GDNative is still work in progress and there are no straightforward tutorials on it but Readme.md from cpp bindings is a good start.