title: invalid operands of types 'const char [6]' and 'const char [3]' to binary 'operator<<'
body: <p>I am getting the below error when I pass a result of conditional operator value to binary operator '&lt;&lt;'
  I saw the suggestions to use parenthesis on conditional operator as it has less precedence than '&lt;&lt;' but it still don't work.</p>
  
  <p>Error:</p>
  
  <blockquote>
    <p>error: invalid operands of types 'const char [6]' and 'const char [3]'
    to binary 'operator&lt;&lt;'</p>
  </blockquote>
  
  <p>code:</p>
  
  <pre><code>void writeToDb(char* msg, bool doUpdate, bool doCommit)
  {
  ostringstream inputStr;
  inputStr &lt;&lt; "DoUpdate=" &lt;&lt; (doUpdate?"True":"False") &lt;&lt; ", "
           &lt;&lt; "DoCommit=" &lt;&lt; (doCommit?"True":"False");
  }
  </code></pre>
  
  <p>Please suggest what I am doing wrong here </p>
  
  <p>Code:</p>
  
  <pre><code>int
  Tracer::writeLog(
      const TxnId &amp; txnId,
      string         termination,
      int            logFlagsMask,
      bool           doUpdate,
      bool           doCommit
  )
  {
    ostringstream inputStr;
    inputStr &lt;&lt; "Txn=" &lt;&lt; txnId.display() &lt;&lt; ", Termination=" &lt;&lt; termination &lt;&lt; ", "
             &lt;&lt; "LogFlagsMask=" &lt;&lt; logFlagsMask &lt;&lt; ", "
             &lt;&lt; "DoUpdate=" &lt;&lt; (doUpdate?"True":"False") &lt;&lt; ", " // this is line 520 in my src file.
             &lt;&lt; "DoCommit=" &lt;&lt; (doCommit?"True":"False");
  }
  </code></pre>
  
  <p>Error:</p>
  
  <blockquote>
    <p>Tracer.cc:520: error: invalid operands of types 'const char [6]' and
    'const char [3]' to binary 'operator&lt;&lt;'</p>
  </blockquote>