How to get return value of c++ int main() output using subprocess.check_output() in python script
How to get return value of c++ int main() output using subprocess.check_output() in python script Question: I am using a C++ script as follows: int main(){ int x =7; std::cout<<"print num:"<<x<<std::endl; if(x>0){ std::cout<<" good"<<std::endl; return 5; } return 0; } For this in my python file I am calling the subprocess as follows: result0_1 = …
Total answers: 1