I want to run a python script from the c. i tried it compile successfully but it give error "python is not recognized as internal or external command, operable program or batch file".
#include <iostream>
using namespace std;
// main() is where program execution begins.
int main()
{
std::string filename = "hi.py";
std::string command = "python ";
command += filename;
FILE* in = popen(command.c_str(), "r");
pclose(in);
return 0;
}