Jul 14, 2004 #1 fugigoose Programmer Jun 20, 2001 241 US How do I write a " into a file? Obviously the compiler doesn't like: fs<<"; Is there a thing like \n that stands for a ". I thought i remember seeing it somewhere. If not maybe a decimal to ascii conversion function? Thanx.
How do I write a " into a file? Obviously the compiler doesn't like: fs<<"; Is there a thing like \n that stands for a ". I thought i remember seeing it somewhere. If not maybe a decimal to ascii conversion function? Thanx.
Jul 14, 2004 #2 xwb Programmer Jul 11, 2002 6,828 GB If ASCII, try fs << (char) 0x22; I don't know about EBCDIC. Upvote 0 Downvote
Jul 14, 2004 1 #3 ArkM IS-IT--Management Oct 21, 2002 1,819 RU Code: fs << "\""; C/C++ escape sequence for quotation mark... Upvote 0 Downvote
Jul 14, 2004 #4 xwb Programmer Jul 11, 2002 6,828 GB Or even fs << '"'; Since it is just a single character. Upvote 0 Downvote
Jul 15, 2004 #5 ArkM IS-IT--Management Oct 21, 2002 1,819 RU With escape sign (in strict language rules: Code: cout << '\"'; Upvote 0 Downvote