Xref: news2.mv.net comp.lang.c:80541 comp.lang.c++:101921 comp.os.msdos.djgpp:7504 Newsgroups: comp.lang.c,comp.lang.c++,comp.os.msdos.djgpp From: Dan DOT Pop AT cern DOT ch (Dan Pop) Subject: Re: fopen problem. Message-ID: Sender: news AT dxnews DOT cern DOT ch (USENET News System) Organization: CERN European Lab for Particle Physics References: <4v1gkv$kld AT lion DOT cs DOT latrobe DOT edu DOT au> <4v3350$nqq AT nntp DOT igs DOT net> Date: Sat, 17 Aug 1996 20:18:14 GMT Lines: 22 To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp In <4v3350$nqq AT nntp DOT igs DOT net> stupy AT thecds DOT com (Steve Tupy) writes: >cs3prj04 AT lion DOT cs DOT latrobe DOT edu DOT au (Cs3prj Group 04) yammered : > >>Under UNIX, can you pass a file name with a path to fopen? If so how do you >>do it? I know that, under DOS, you do it like so : c:\\directory\\filename.ext. > >FILE *fp = fopen("/usr/local/bin/myfile_what_is_this_doing_here.txt", >"rt"); > > or whatever open mode you prefer! Why did you prefer "rt" to, say, "ry" or "rz"? To the best of my knowledge, all three of them are guaranteed, by an international standard, to be equivalent to the good old "r" mode. Dan -- Dan Pop CERN, CN Division Email: Dan DOT Pop AT cern DOT ch Mail: CERN - PPE, Bat. 31 R-004, CH-1211 Geneve 23, Switzerland