title: Why doesn't my function that accepts an `std::string` to sort change it?
body: <p>I have a project and I want to ask for some things. How can I make a string with descending order using <code>cin&lt;&lt;word;</code>? I tried this from a website that I found but it doesn't work with cin. Here is the code: </p>
  
  <pre><code>void descOrder(string s) 
  { 
      sort(s.begin(), s.end(), greater&lt;char&gt;()); 
  } 
  
  int main() 
  { 
      string s = "geeksforgeeks"; 
      descOrder(s); // function call 
      return 0; 
  } 
  </code></pre>
  
  <p>To be more clear I want to do this</p>
  
  <ul>
  <li>Input: <code>geek for geeks</code></li>
  <li>Output <code>ssrokkggfeeee</code></li>
  </ul>
  
  <p>Also, how can I replace letters from a string using the alphabet, for instance, the Hello I want to be like this H to be I, e to be f, l to be m, o to be p, and if a word contains the letter z I want to replace with the letter a.</p>
  
  <p>The final question I want to print from a string first the according and after the vowels</p>