GIDForums  

Go Back   GIDForums > Computer Programming Forums > MS Visual C++ / MFC Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 30-Jan-2006, 09:49
Dominic Dominic is offline
Member
 
Join Date: Aug 2005
Posts: 123
Dominic will become famous soon enough

Use of forward slash in a directory path


Does anyone know if I can use the foward slash symbol in a directoty path? We are using some exiting code written for unix and this code uses a hard coded unix directory path.
If we were to try an fopen() with this hard coded text string, would the windows OS convert the forward slashes to back slashes and get the correct directory?

Regards
Dominic
  #2  
Old 30-Jan-2006, 10:16
Paramesh's Avatar
Paramesh Paramesh is offline
Regular Member
 
Join Date: Sep 2005
Location: The Milky Way
Posts: 929
Paramesh is a jewel in the roughParamesh is a jewel in the roughParamesh is a jewel in the rough

Re: Use of forward slash in a directory path


I think Yes!
Windows will convert the forward slashes to back slashes.

(Tried a simple one: Typed c:\windows and c:/windows in Start->Run
Also tried a simple windows program)

Regards,
Paramesh.
__________________

Don't walk in front of me, I may not follow.
Don't walk behind me, I may not lead.
Just walk beside me and be my friend.
  #3  
Old 30-Jan-2006, 11:00
WaltP's Avatar
WaltP WaltP is offline
Outstanding Member
 
Join Date: Feb 2004
Location: Midwest US
Posts: 3,335
WaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to allWaltP is a name known to all

Re: Use of forward slash in a directory path


Quote:
Originally Posted by Dominic
Does anyone know if I can use the foward slash symbol in a directoty path? We are using some exiting code written for unix and this code uses a hard coded unix directory path.
If we were to try an fopen() with this hard coded text string, would the windows OS convert the forward slashes to back slashes and get the correct directory?

Regards
Dominic
Write a test program and find out. You'd get an answer in seconds instead of half hour or more...
__________________

During the election they said Obama could only be elected when pigs fly. Well, we currently have an epidemic of Swine Flu. Coincidence?
  #4  
Old 31-Jan-2006, 01:55
Dominic Dominic is offline
Member
 
Join Date: Aug 2005
Posts: 123
Dominic will become famous soon enough
Unhappy

Re: Use of forward slash in a directory path


I ususaly do, but they have changed my computer and I have no access to Visual C++ for the next few days.

Cheers
 
 

Recent GIDBlogProgramming ebook direct download available by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
shortest path algorithm and file saving Pandiani C++ Forum 10 17-Jul-2006 11:46
fltk-2.0 cvs Plumb FLTK Forum 20 13-Nov-2004 08:10
Apache2 config issues monev Apache Web Server Forum 2 28-Jun-2004 07:19
[PROGRAM] Windows Search Program machinated C++ Forum 10 21-Jun-2004 16:21
Can't view pages from another machine on the Intranet aevans Apache Web Server Forum 9 14-May-2004 03:26

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 19:20.


vBulletin, Copyright © 2000 - 2009, Jelsoft Enterprises Ltd.