title: convert from string to byte[] and add the result into a memorystream
body: <p>how can i convert a string into a byte[] and them add the result using in a stream. THX. I am working in c++ code, ubuntu.</p>
  
  <p>EDIT:
  i have a std::string as a string value.
  I need a method that takes as an input a std::string value and returns as an output the stream value.</p>