Solved

Easy question.

Posted on 2000-03-02
2
176 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
2 Comments
 
LVL 3

Accepted Solution

by:
mnewton022700 earned 10 total points
Comment Utility
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
Comment Utility
cool , thank you..
0

Featured Post

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Strange date stored 22 99
conditional code and condition difference 9 65
modThree challenge 4 64
zeroFront challenge 7 70
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…

763 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

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now