Search code examples
c++pythoncconnectionio

connecting c/c++ and python


What I am trying to do is that I want to read a file using python, and then with the data in the file, create a variable in c/c++(I don't want to read var from the file :) ).

Is this possible? If this is possible, then how would you do it?

Thank you guys!


Solution

  • Yes. Open the first file in Python, process it and save the results to a second file.

    Then open the second file in your C or C++ program and use the data.