title: function overloading on operator overloading function
body: <p>I've two similar operator overloading functions, the first return an object, and the second return an char.</p>
  
  <pre><code>Cell&amp; operator[](std::pair&lt;int, int&gt; pos) {
    if (pos.first &gt; 0 &amp;&amp; pos.first &lt; n || pos.second &gt; 0 &amp;&amp; pos.second &lt; n) {
      return Board[pos.first][pos.second];
    } else {
      cout &lt;&lt; "Illegal2" &lt;&lt; std::endl;
    }
  }
  char operator[](std::pair&lt;int, int&gt; pos) {
    if (pos.first &gt; 0 &amp;&amp; pos.first &lt; n || pos.second &gt; 0 &amp;&amp; pos.second &lt; n) {
      return Board[pos.first][pos.second].getCellValue();
    } else {
      cout &lt;&lt; "Illegal2" &lt;&lt; std::endl;
    }
  }
  </code></pre>
  
  <p>I call the first one using <code>board1[{1,2}]='O';</code> (I have also = overloading function).
  the second one I want to use that way: <code>char c = board1[{1, 2}];</code>
  But its seem the compiler cannot decide which one of the function to use.</p>
  
  <p>the propeties of the classes is:</p>
  
  <pre><code>class XOBoard {  // its only a part of the code.
   private:
    int n;
    Cell** Board;
  };
  class Cell {
   private:
    char ch;
  
   public:
    Cell(char ch = '.');
    char getCellValue() const;
    void setCellValue(char nch);
    friend std::ostream&amp; operator&lt;&lt;(std::ostream&amp; output, const Cell&amp; Cell) {
      output &lt;&lt; Cell.ch;
      return output;
    }
  };
  </code></pre>