From the popen manual:
#include <stdio.h>
FILE *popen(const char *command, const char *type);
int pclose(FILE *stream);
More Related Contents:
- How do I execute a command and get the output of the command within C++ using POSIX?
- Order of evaluation of arguments using std::cout
- Why should the system() function be avoided in C and C++?
- C++ alignment when printing cout
- redirect stdout/stderr to a string
- C++ system() not working when there are spaces in two different parameters
- How can I redirect stdout to some visible display in a Windows Application?
- Issuing system commands in Linux from C, C++
- launch an exe/process with stdin stdout and stderr?
- cannot convert ‘std::basic_string’ to ‘const char*’ for argument ‘1’ to ‘int system(const char*)’
- Rewinding std::cout to go back to the beginning of a line
- changing the directory from inside a c program under windows using system command
- Is there a way to not wait for a system() command to finish? (in c) [duplicate]
- Redirect both cout and stdout to a string in C++ for Unit Testing
- How to properly use system() to execute a command in C++?
- Is there a guarantee of stdout auto-flush before exit? How does it work?
- System() calls in C++ and their roles in programming
- How do I sort a std::vector by the values of a different std::vector?
- MSVC++ variadic macro expansion
- Difference between long and int data types [duplicate]
- How to check if the program is run from a console?
- Is there any way a C/C++ program can crash before main()?
- What is the uintptr_t data type?
- How to provider user with autocomplete suggestions for given boost::spirit grammar?
- Default parameters with C++ constructors [closed]
- How does delete work? [duplicate]
- Making a C++ class a Monitor (in the concurrent sense)
- When and why would you use static with constexpr?
- Benefits of using reserve() in a vector – C++
- Checking if all elements of a vector are equal in C++