Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C Programming > fopen in specific environments

Reply
Thread Tools

fopen in specific environments

 
 
ataru@nospam.cyberspace.org
Guest
Posts: n/a
 
      08-11-2003
Sorry to ask a semi implementation-dependent question, but I'm having some
trouble with fopen() in a Windows environment... I want to open a file a la

FILE *f;
f=fopen( "L:\Apps\CTRemote\pairs", "r" );

I know the file exists, but I can't seem to get it open like this. If I use
lower case letters, it says the syntax is bad or something. Is there some
stupid trick to this?

--
Christopher Benson-Manica | Jumonji giri, for honour.
ataru(at)cyberspace.org |
 
Reply With Quote
 
 
 
 
Martin Ambuhl
Guest
Posts: n/a
 
      08-11-2003
http://www.velocityreviews.com/forums/(E-Mail Removed) wrote:
> Sorry to ask a semi implementation-dependent question, but I'm having some
> trouble with fopen() in a Windows environment... I want to open a file a la
>
> FILE *f;
> f=fopen( "L:\Apps\CTRemote\pairs", "r" );


You have specified a name with the three single characters '\A', '\C', and
'\p'. There is no reason to use the dyslexic command.com naming style, but
if you must:
f=fopen( "L:\\Apps\\CTRemote\\pairs", "r" );
Better is to avoid escape sequences entirely:
f=fopen( "L:/Apps/CTRemote/pairs", "r" );

> I know the file exists, but I can't seem to get it open like this.


Because you misnamed it.




--
Martin Ambuhl

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
fopen() with full path affecting subsequent fopen calls Michel Rouzic C Programming 4 04-28-2008 04:48 PM
Is ViwState Page-Specific or UserControl-Specific =?Utf-8?B?SmF2?= ASP .Net 2 08-16-2006 09:30 PM
What is up with fopen??? FOpen and local directories Nonee HTML 2 10-25-2005 09:18 PM
redirect traffic on specific ip to specific interface mimiseh Cisco 3 06-05-2005 09:14 PM
Re: fopen in specific environments Kevin Easton C Programming 1 08-12-2003 10:06 AM



Advertisments