Standard output strange behavior <p>I have an issue using Eclipse cdt and I am facing a strange behavior:</p> <pre><code>cout &lt;&lt; "Hello world" &lt;&lt; endl; aFunction(); // The output here is Hello world // END </code></pre> <p>When I take off the <code>endl</code> the output is nothing</p> <pre><code>cout &lt;&lt; "Hello world"; aFunction(); // No output // END </code></pre> <p>and when I put the <code>endl</code> later it works fine :</p> <pre><code>cout &lt;&lt; "Hello world"; aFunction(); cout &lt;&lt; endl; // output is Hello world // END </code></pre> <p>Now, I can't provide the function code, because it will take me a thousand of lines.</p> <p>However, I tried this with a function that does nothing <code>void toto(){}</code> and there was not this strange thing .</p> <pre><code>cout &lt;&lt; "Hello world"; toto(); // Gives me Hello world // END </code></pre> <p>What I want to know is what can cause this ?? </p> <p><strong>EDIT :</strong> The tests with foo are tested alone (no other instructions), In the other tests, I initialize a structure that I give as a parameter to <code>aFunction</code>. The function uses some metaprogramming and there is a lot of code i need to show so you understand it.</p>