Overloading I/O operator C++
<p>I'm trying to overload the &lt;&lt; operator. I'm expecting the output to be InitializingHello WorldOut but it is just outputting Hello World. I can't figure out what is wrong with my code. Thanks for your help.</p>

<pre><code>  #include &lt;iostream&gt;
  using namespace std;


  ostream &amp;operator &lt;&lt; (ostream &amp;out, const char* &amp;s)
  {
    out &lt;&lt; "Initializing" &lt;&lt; s &lt;&lt; "Out";
    return out;
  }

  void main() {

    cout &lt;&lt; "Hello World" &lt;&lt; endl;
    system("Pause");
  }
</code></pre>
