Answer the question
In order to leave comments, you need to log in
How to write a program in two languages?
I want to write part of the program in python and the other in c++. That type:
#include <iostream>
int main()
{
int x;
std::cin >> x;
}
Answer the question
In order to leave comments, you need to log in
When will you learn how to google?
https://docs.python.org/3.8/extending/extending.html
https://habr.com/ru/post/469043/ plus there in the links different methods are considered
You have tritely different file extensions, there’s nothing to do without external libraries, but I won’t vouch for their performance. You can write variables to json and read them in c++.
The easiest way is to write the value of the variable to a txt file and read it in Python code.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question