How to enter " as string or character

Hi everyone, first of all thank you for reading this it's very kind of you.

The problem I have is that I want to enter " as a string or character for example I want to store: Carlos says: "He is the best" in a char array or string what I've been trying to do is

char a[] = "Carlos says: "He is the best""

well, for that I get an error, please I'd really appreciate any help.

Jano
Use a '\' to escape it:

std::string str = "Carlos says: \"He is the best\"";
Topic archived. No new replies allowed.