title: How do I print "\n" explicitly in a string in c++
body: <p>hi i have a unknown string in c++ containing "\n" "\t" etc.
  say;</p>
  
  <pre><code>string unknown1=read_from_file();
  </code></pre>
  
  <p>if unknown1="\n\t\n\t\n\n\n\n\n" now I want to print</p>
  
  <pre><code>"\n\t\n\t\n\n\n\n\n"
  </code></pre>
  
  <p>to the screen explcitly other than a bunch of empty spaces.... how should I do that? remember that I don't know what is in unknown1...</p>
  
  <p>to emphasize, I know that we could print \n explicitly if we change "\n" into "\n" for every such character... But the problem is that I don't know what is inside unknown1... It is read from a file....</p>
  
  <p>Thanks for answering, however we have further concerns:</p>
  
  <p>The procedure answered has one more porblem... Suppose I don't know that the only possible special character in the file is \n or \t... maybe there are something like \u ? \l ? i think we can't exhaust every possibility right? Is there kind of built in C++ function just to output the corresponding characters?</p>