Call a Quote as String

Hello!

I would like to call a quote symbol as a string, nevertheless looks like the code is wrong for the compiler. Could someone show me my mistake? Below follow my code:

 
 std::string double_quote= " " "; 
Last edited on
Hello DanielDeChamps,

A single double quote needs to be escaped to be considered a single quote.

Try this std::string double_quote= " \" ";.

Andy
oooh yes! Therefore It is similar to \n to jump lines. Thank you so much.
Last edited on
Hello DanielDeChamps,

You are welcome.

I did find this that should help https://stackoverflow.com/questions/10220401/rules-for-c-string-literals-escape-character

Andy
I am reading all, thank you so much Handy Andy and Seeplus.
Last edited on
Topic archived. No new replies allowed.