hello, I'm currently writing a program to write a website easier, but i don't know, how output " to a file? thank you very much for help

Recommended Answers

All 2 Replies

Wow, how vague. I'm assuming you have a string literal and want to put a double quote inside of it. In that case you escape it with a backslash:

cout<<"I'm a \"quoted\" string\n";

With character literals the escape is not needed:

cout<<"I'm a "<<'"'<<"quoted"<<'"'<<" string\n";

Thanks man :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.