title: operator overloading for manipulators
body: <p>I think the following code can be used to create manipulators.</p>
  
  <pre><code>#include&lt;iostream&gt; 
  ostream &amp; symbol(ostream &amp; output)
  {
    return output &lt;&lt; "\tRs";
  }
  </code></pre>
  
  <p>it is working fine. The following statement</p>
  
  <pre><code>  cout &lt;&lt; "Total amount: " &lt;&lt; 567 &lt;&lt; symbol; 
  </code></pre>
  
  <p>gives the output</p>
  
  <pre><code> Total amount: 567   Rs
  </code></pre>
  
  <p>But I didn't understand why it is working.
  I have the following information about operator overloading in C++.</p>
  
  <ol>
  <li><p>only existing operators can be overloaded. New operators cannot be created.
   But the <em>symbol</em> is not existing operator. </p></li>
  <li><p>In the statement (<em>cout &lt;&lt; "Total amount: " &lt;&lt; 567 &lt;&lt; symbol;</em>), it seems that <em>&lt;&lt;</em> is the overloaded operator and <em>symbol</em> is a variable/object. 
  But I didn't declare <em>symbol</em> as variable/object. </p></li>
  <li><p>why are they using the return statement (<em>return output &lt;&lt; "\tRs";</em>)?. I think (<em>return "\tRs";</em>) or (<em>output &lt;&lt; "\tRs";</em>) should work.( I tried but not working :) )</p></li>
  </ol>
  
  <p>Actually I don't know how the above code is working. Is there anybody to explain the working of the above operator overloading?</p>