From: Damian Yerrick Newsgroups: comp.os.msdos.djgpp Subject: Re: open dir Organization: Rose-Hulman Institute of Technology Message-ID: References: <31216 DOT 940934451 AT www1 DOT gmx DOT net> <7v45v8$9uk$1 AT baker DOT cc DOT tut DOT fi> X-Newsreader: Forte Agent 1.6/32.525 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 36 X-Trace: /bCCZHmJMMH0SYRxPohFiT4h9oRrOcNvd7gFimzn4gB60xHodcmCeeykuq4U6yxFRS02m6qLVVO+!yDIl7CJ02GRLd5f8hStSOAsjdys7eVyqco3zjKwRHjJa6JIXFgLr2P4VfBN5dboq X-Complaints-To: abuse AT gte DOT net X-Abuse-Info: Please be sure to forward a copy of ALL headers X-Abuse-Info: Otherwise we will be unable to process your complaint properly NNTP-Posting-Date: Tue, 26 Oct 1999 13:52:24 GMT Distribution: world Date: Tue, 26 Oct 1999 13:52:24 GMT To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com On 26 Oct 1999 12:14:32 GMT, Forsberg Sakari wrote: > hela DOT wann AT gmx DOT net wrote: > > How can I open a file in another dir? > > > The program runs in c:\test and the file shall be opened in c:\test\object > > I don't know whether you want us to tell you > what function you have to use, or > what syntax you have to use... > > it should be enough that you > put "object\filename" in the opening command > instead of "filename". > > > how do i have to implement thie? fopen("object/foo.bin", "rb"); or fopen("object\\foo.bin", "rb"); If you use backslashes, you have to double up because C treats \ as an escape character. > What? C and C++ use \n for newline, that is, Ctrl+J. \r is Return (Ctrl+M), \t is Tab (Ctrl+I), etc. -- Damian Yerrick Mail me from the link on my web site: Pinocchio's Brother