title: Comparing values in a linked list
body: <p>This is my class</p>
  
  <pre><code>class Element
  {
    public:
      comparegreater(Element* temp1, Element* temp2)
  
    private:
      int row
      int col
      int value
      Element* next
  };
  </code></pre>
  
  <p>I have a linked list and I need help with a function which is suppose to compare the first element (int value) and second element (int value) in the linked list.</p>
  
  <p>How do I go about comparing these two values? This is what I have tried so far which I am sure is wrong. I know the answer</p>
  
  <pre><code>bool Element::comparegreater(ElementPtr temp1,ElementPtr temp2)
  {
    if (temp1 &gt; temp2)
    {
      return 1;
    }
    else
    {
      return 0;
    }
  }
  </code></pre>