running c++ code from python

前端 未结 4 601
日久生厌
日久生厌 2021-02-06 05:39

I want to execute a code helloword.cpp which takes in some argument from console parses those arguments and then prints \"hello world\" in the console.

Now, I want to pa

4条回答
  •  梦谈多话
    2021-02-06 06:28

    Using boost.python sounds like a good solution for me. But depending on your C++ experience this can be quite tricky. A good point to start is here:

    http://wiki.python.org/moin/boost.python

    Boost.Python enables you to export C++ classes and member functions to Python to be able to use them from there.

提交回复
热议问题