Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Quotes within quotes!
Index -> Programming, C++ -> C++ Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Geminias




PostPosted: Thu Nov 17, 2005 3:46 pm   Post subject: Quotes within quotes!

how can you use quotes in a string?

for instance if you needed to write " People who call themselves "artists" are gay"

forget single quotes.. how can you get double quotes to work inside the string?
Sponsor
Sponsor
Sponsor
sponsor
beard0




PostPosted: Thu Nov 17, 2005 3:48 pm   Post subject: (No subject)

I don't program c, but I can all but guarantee that you use \"
i.e. "Those that think that people who call themselves \"artists\" are gay, are homophobes."
Tony




PostPosted: Thu Nov 17, 2005 3:48 pm   Post subject: (No subject)

that's... an example Confused

anyways, escape characters.. such as \"
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Geminias




PostPosted: Thu Nov 17, 2005 7:25 pm   Post subject: (No subject)

yay! thanks all
md




PostPosted: Thu Nov 17, 2005 10:35 pm   Post subject: (No subject)

you should really use a less provocative example... I mean really how hard would it have been...
beard0




PostPosted: Thu Nov 17, 2005 10:42 pm   Post subject: (No subject)

Cornflake wrote:
you should really use a less provocative example... I mean really how hard would it have been...


Yeah, I don't think he picked up on my comment.
Display posts from previous:   
   Index -> Programming, C++ -> C++ Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 6 Posts ]
Jump to:   


Style:  
Search: