Solved

Easy question.

Posted on 2000-03-02
2
215 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
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.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…

617 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