. (, Windows, 100%).
popen , , cmd.exe /c <here>.
cmd.exe /c Windows .
, nope:
C:\>cmd /c "foo bar"
'foo' is not recognized as an internal or external command,
operable program or batch file.
circumflex?
C:\>cmd /c ^"foo bar^"
'foo' is not recognized [...]
?
C:\>cmd /c foo^ bar
'foo' is not recognized [...]
?
C:\>cmd /c foo" "bar
'foo" "bar' is not recognized as an internal or external command,
operable program or batch file.
! ! foo bar? :
C:\>copy con "foo bar.bat"
echo i am foo bar
^Z
1 file(s) copied.
C:\>cmd /c foo" "bar
C:\>echo i am foo bar
i am foo bar
! !
, Visual Studio 2008:
#include <stdio.h>
int main()
{
FILE *in = _popen("C:\\Program\" \"Files\\Internet\" \"Explorer\\iexplore.exe", "r");
if (in) {
char line[200];
printf("successfully opened!\n");
if (fgets(line, 200, in))
fputs(line, stdout);
_pclose(in);
}
return 0;
}
Internet Explorer, fgets ( , ).
MinGW, Microsoft C; , , , Windows MinGW.
:
. , . ; , , .
, , . , , - C:\Program Files\Bob so-called "editor"\bedit.exe.