I am using a complex C++ code with a Python3 interface (using ctypes). For simplicity, I have copied a simple C++ code below to frame my question. The function
ctypes