Found an alternative way, or rather, the equivalent of a popen window. This is _popen (). This only works for me, and in addition, it is easy to use.
char psBuffer[128]; FILE *pPipe; if( (pPipe = _popen( "dir", "rt" )) != NULL) { while(fgets(psBuffer, 128, pPipe)) { printf(psBuffer); } }
Find details with a complete example here .
source share