Solved

Easy question.

Posted on 2000-03-02
2
211 Views
Last Modified: 2013-11-20
Why is it that I have to put two back slashes when passing directories to a VC program. Example.

This works

ShellExecute(NULL,"open","NOTEPAD.EXE",NULL,
"C:\\WINDOWS\\",SW_NORMAL);

but this does not

ShellExecute(NULL,"open","NOTEPAD.EXE",NULL,
"C:\WINDOWS\",SW_NORMAL);

Just wondering.
0
Comment
Question by:lgalma
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
mnewton022700 earned 10 total points
ID: 2578055
The '\' character is used to denote a special character. For example '\n' is a new line, while '\t' is a TAB. Writing '\\' actually represents just a '\' character. So the second code piece will not because '\W' and '\"'
are not recognised characters.
0
 

Author Comment

by:lgalma
ID: 2578093
cool , thank you..
0

Featured Post

Enroll in May's Course of the Month

May’s Course of the Month is now available! Experts Exchange’s Premium Members and Team Accounts have access to a complimentary course each month as part of their membership—an extra way to increase training and boost professional development.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Introduction: Load and Save to file, Document-View interaction inside the SDI. Continuing from the second article about sudoku.   Open the project in visual studio. From the class view select CSudokuDoc and double click to open the header …
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
This video shows how to use Hyena, from SystemTools Software, to update 100 user accounts from an external text file. View in 1080p for best video quality.

710 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question