Mail Archives: djgpp/1998/02/04/04:01:15
>
> When I run a program with something like "system( "readme.txt" );" in
> the code, the program crashes, both under Windows 95 and DOS 7.
>
> Why?
because "readme.txt" is not an executable file. IIRC system() passes the
string to the shell for execution. This means that the string must
contain a valid command for the shell.
if you try "readme.txt" under command.com you will get "bad command or file
name" (or something like that).
You can try "start readme.txt". It should work for all registered files.
ciao
Giacomo
- Raw text -