Programming languages cannot be easily converted like this. For example, Python has a large standard library, C++ doesn't have the same library. How do you translate those calls?
More fundamentally, the semantics of the language are very different, even a statement as simple as x = 1
means something different in Python and C++.
You are going to have to write C++ while reading the Python.