title: Replace cout<<"string" with cout<<"string"<<endl in cpp
body: <p>I want to replace each <code>cout</code> occurring in a program with same but <em>concatenated with <code>endl</code></em>. I'm trying to use macros for this but unable to figure that out how to do that. Please help!</p>
  
  <p>Is there a way to get complete line written in program and just concat <code>&lt;&lt; endl</code> with it?
  Note if <code>endl</code> is already written by programmer, no <code>endl</code> will be concatenated.</p>
  
  <p>If any other better method possible, please suggest.</p>