

InterviewSolution
1. |
Solve : Drawing a blank on C++ and write " " to file? |
Answer» Drawing a blank on how to write "." to config.conf file without C++ thinking " " is the start and stop of string to write to file. Did a quick google search for like cout<<"""\n"; to display "" and no results, since this is related to the same problem. 'for escape character. Now I know its Quote \. Was thinking it was like cout<<"Print this '".'" \n"; Figured not to include that in my post for help since it was way wrong. Also forgot the correct terminology of "Escaping", but knew that there was a way to lead it with another character to have it ignore the " inside the string to print or write. Been playing with C++ off and on for last 13 years, and it wasnt until now that I need to MAKE a dynamic config file that I ran into this issue, since I normally dont quote out information to user or to files. When I went to compile my source and saw the many errors blatting about the same thing I was like hmm its looking at those quotes and way back in 1998 I remember the college professor going into this issue and that a leading character tagged the quotes as ignore, but what was it and what was the correct terminology for what I need to do, which you answered both. Thanks |
|