<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic C++ Overloaded pure virtual operators in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/c-overloaded-pure-virtual-operators/m-p/2428623#M728875</link>
    <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I cannot figure out why the 10.2 compiler complains....&lt;BR /&gt;&lt;BR /&gt;class IFile&lt;BR /&gt;{&lt;BR /&gt;public:&lt;BR /&gt;&lt;BR /&gt;  virtual IFile&amp;amp;  operator &amp;lt;&amp;lt; ( IFile&amp;amp; f, const unsigned int u) const =&lt;BR /&gt;0;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;with the following error...am I losing my mind???&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error 317: "dennis1.hxx", line 7 # Overloaded operator "IFile&lt;BR /&gt;&amp;amp;IFile::operator&lt;BR /&gt;    &amp;lt;&amp;lt;(IFile &amp;amp;,unsigned int) const" expected to take 1 arguments.&lt;BR /&gt;      virtual IFile&amp;amp;  operator &amp;lt;&amp;lt; ( IFile&amp;amp; f, const unsigned int u)&lt;BR /&gt;const = 0;&lt;BR /&gt;&lt;BR /&gt;Any thoughts??????&lt;BR /&gt;&lt;BR /&gt;</description>
    <pubDate>Fri, 30 Jun 2000 17:28:50 GMT</pubDate>
    <dc:creator>Hai Nguyen Dennis Kavan</dc:creator>
    <dc:date>2000-06-30T17:28:50Z</dc:date>
    <item>
      <title>C++ Overloaded pure virtual operators</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-overloaded-pure-virtual-operators/m-p/2428623#M728875</link>
      <description>Hello all,&lt;BR /&gt;&lt;BR /&gt;I cannot figure out why the 10.2 compiler complains....&lt;BR /&gt;&lt;BR /&gt;class IFile&lt;BR /&gt;{&lt;BR /&gt;public:&lt;BR /&gt;&lt;BR /&gt;  virtual IFile&amp;amp;  operator &amp;lt;&amp;lt; ( IFile&amp;amp; f, const unsigned int u) const =&lt;BR /&gt;0;&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;with the following error...am I losing my mind???&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Error 317: "dennis1.hxx", line 7 # Overloaded operator "IFile&lt;BR /&gt;&amp;amp;IFile::operator&lt;BR /&gt;    &amp;lt;&amp;lt;(IFile &amp;amp;,unsigned int) const" expected to take 1 arguments.&lt;BR /&gt;      virtual IFile&amp;amp;  operator &amp;lt;&amp;lt; ( IFile&amp;amp; f, const unsigned int u)&lt;BR /&gt;const = 0;&lt;BR /&gt;&lt;BR /&gt;Any thoughts??????&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 30 Jun 2000 17:28:50 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-overloaded-pure-virtual-operators/m-p/2428623#M728875</guid>
      <dc:creator>Hai Nguyen Dennis Kavan</dc:creator>
      <dc:date>2000-06-30T17:28:50Z</dc:date>
    </item>
    <item>
      <title>Re: C++ Overloaded pure virtual operators</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/c-overloaded-pure-virtual-operators/m-p/2428624#M728876</link>
      <description>Hi, &lt;BR /&gt;&lt;BR /&gt;This is normal. You should believe what the compiler tells you: the left shift operator expects only 1 parameter. You can't just choose a random signature for parameter overloading. Try: &lt;BR /&gt;&lt;BR /&gt;virtual IFile&amp;amp; operator &amp;lt;&amp;lt; ( unsigned int u);&lt;BR /&gt;&lt;BR /&gt;Some more remarks: &lt;BR /&gt;1. It doesn't make sense to write "const unsigned int". This is redundant information. If you simply write "unsigned int", it's const enough.&lt;BR /&gt;&lt;BR /&gt;2. I shouldn't define this function const. Were you planning not to alter the "this" object in the implementation of your operator? Then what would you return (as a reference)? Not a local variable I hope? &lt;BR /&gt;&lt;BR /&gt;bye, &lt;BR /&gt;Rik&lt;BR /&gt;</description>
      <pubDate>Sun, 16 Jul 2000 18:36:12 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/c-overloaded-pure-virtual-operators/m-p/2428624#M728876</guid>
      <dc:creator>RikTytgat</dc:creator>
      <dc:date>2000-07-16T18:36:12Z</dc:date>
    </item>
  </channel>
</rss>

