473,378 Members | 1,426 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

Ending string assignment with "\".....

Whay can't I end a string assignment with the '\'....
fylpath = "c:\scripts\python\prod_select\"
the last '\' isn't included in the string when I print the string. I was using the string to define a DOS path to a file.
May 23 '11 #1

✓ answered by bvdet

Use "\\" to print the backslash character.

1 1656
bvdet
2,851 Expert Mod 2GB
Use "\\" to print the backslash character.
May 23 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: Mark Hansen | last post by:
Friends, I'm using db2sql92 to execute an SQL script that is performing an insert operation on a table in a DB2, version 8.2 database server. The string value contains embedded semicolon...
6
by: PX | last post by:
Greetings, Please take a look at following code: " struct STR { char string; ... /* something else */ };
6
by: Greg Merideth | last post by:
While I can't post all of the code I'll post snippets but, it appears that C# is *not* assigning a string, inside of a class, a value that I am passing to it using its public set method and I can't...
4
by: Tom | last post by:
Hi, I need to make the following sentence to be a string variable and how should I do it? server=SQL;database=SQLTest;user id=test;password=1234 private static string str= "server=SQL" +...
1
by: Ben Harper | last post by:
In VC7, look at the following code: char* ok1 = "1234567890ABCD"; char* ok2 = "1234567890ABCDE"; char* bad1 = "1234567890ABCDEF"; char* bad2 = "1234567890ABCDEFG"; string take; take = ok1;...
1
by: Brown Smith | last post by:
At run time I am building the HTML table as follows for literal control. HTML Table related data ... <span style='background-color: #FFDD00'>could be any data here LIKE DATA 1 </span> ...
5
by: shan_rish | last post by:
Hi Group, When i compile the following program it compiles successfully, but crashes while executing. I am trying to assign a NULL char pointer to a string. The error message is ...
1
by: oza.hardik | last post by:
Hello, Is there a way to do a verbatim string assignment in JavaScript. Like I could create strings with HTML snippets and reuse in my code. Thanks in advance O
4
by: S S | last post by:
I have a little question. Usually we assign String str = "hello"; char* p = str.Str(); //here Str() returns a char*, not a copy or we do char* p = strdup(str.Str()) // incase if scope of...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.