title: No matching function call to State::State (State )
body: <p>I dont know why this calling for the copy Constructer in class Node   give this error , although class State copy constructer work in the main ,  take a look .</p>
  
  <p>Note:my compiler is gcc version 4.8.2 .</p>
  
  <pre><code>class Node
  {
  public:
    Node(Node&amp; rhs);
    Node(State state);
  
  private:
    State mystate;
    Node* next;  // pointer to the next node
  };
  
  
  
  Node::Node(Node&amp; rhs) : mystate(rhs.getState()), next(NULL)
  {
    // the error  here  how ever I could call
    // State cpy constructer in main or other places ! 
  }
  
  Node:: Node(State state): mystate(state) , next(NULL)
  {
    //....
  }
  
  
  
  class State
  {
  public:
    State(State&amp; RHS);
    void operator = (State&amp; RHS);
  
  private:
    State* parent;
  
  
    State::State(State&amp; RHS) : parent(NUL)
    {
      .....
    }
  
    void State::operator = (State&amp; RHS)
    {
    }
  
  };
  
  
  
  int main()
  {
    State x;
    State m = x; //  here State cpy constructer called successfuly
    return 0;
  }
  </code></pre>