Is it possible to return values from a shell prompt back into c++ as a variable?
IE: If I have the line system("cat *txt");
I am unable to store any of the results within my c++ program.
Thanks!
Is it possible to return values from a shell prompt back into c++ as a variable?
IE: If I have the line system("cat *txt");
I am unable to store any of the results within my c++ program.
Thanks!
It looks like a good way is to direct the results of the command to a file and then read the file in c++:
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.