When will fopen fail?

Chengi Jimmy Kuo cjkuo at locus.com
Fri Apr 19 07:22:00 AEST 1991


stanley at phoenix.com (John Stanley) writes:

>markh at csd4.csd.uwm.edu (Mark William Hopkins) writes:

>>    Assuming all the subdirectories are there and writeable (on UNIX or
>> MS-DOS), when does
>> 
>> 		     FP = fopen("...", "w");
>> 
>> fail and return FP == NULL?

>   On MS-DOS, under TC 2.0, all the time. Perror returns "no such file or
>directory".

Because "..." is an illegal filename under DOS.
-- 
cjkuo at locus.com
"The correct answer to an either/or question is both!"



More information about the Comp.lang.c mailing list