Closed Soebb closed 4 months ago
What are asking exactly? If you just want that above block run as-is from cppyy, drop it into a cppyy.cppdef
call, then run cppyy.gbl.main()
.
If you are asking on how to get user input from a prompt, I wouldn't bother using the C++ facilities, but use Python's, e.g. https://docs.python.org/3/library/functions.html#input .
For these which haven't a class, how i should write it's python code? And how pass a user input to it since it have one?