Skip to content
Advertisement

C++ to simpler language (Python, Lua, etc) converter? [closed]

I know Python and I’ve come across a small C++ source file I would like to convert to Python. But the C++ code is too complex for me to understand without learning the language.

So I was wondering if there is a tool that does the opposite of what many people want: convert C++ code to Python, or another simpler language I could understand. I know these tools work on very simple code and hardly do a perfect job even then, but the code I have is pretty small and simple.

I have found “ctopy”, but there is no usage example, if I just pass a .cpp file to it, it just hangs, no error message or anything. And maybe it won’t work for C++ at all. http://www.catb.org/~esr/ctopy/

Advertisement

Answer

Most translators produce inferior code which you can’t really use anywhere; and the more complicated your code is, the worse the results are. Only real human brains can do that perfectly. I’d suggest that you learn the language. If you already know python, learning another language shouldn’t be too difficult.

User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement