title: C++ Carriage return and line feed in a string
body: <p>I am working with the communication for some TCP/IP connected equipment in C++.
  The equipment requires that the commands sent are ended with \r\n.</p>
  
  <p>I am using a configuration file from which I am reading the commands used in the communication. </p>
  
  <p>The problem I have is that the commands \r\n are interpreted as the 4 characters they are and not as carriage return and line feed.</p>
  
  <p>I have tried to use the   string.data() but I get the same result as string.c_str().</p>
  
  <p>Is there any nice function to get it correct from the beginning or do I have to solve this with a normal replace function? Or some other way that I have not thought about?</p>
  
  <p>I guess, if I don't find a really neat way to do this I will just omitt the \r\n in the configuration file and add it afterwards, but it would be nice to have it all in the configuration file without any hard coding. I think I would need to do some hard coding as well if I would try to replace the four characters \r\n with their correct characters.</p>
  
  <p>Thanks for any help</p>
  
  <p>Edit:
  The config file contains lines like this one.</p>
  
  <p>MONITOR_REQUEST      = "TVT?\r\n"</p>