The object qualifer that are not compatible with the member functions : <p>I am trying to change a subclass values Capacity, RentRate and RentMin using operation overloading. I'm newish to c++, come from java.
I want to create the objects</p>

<pre><code>VanIn Van7("Large", 200, 2.0);
ManVanIn ManVan8("Abc", 99999, "Medium", 100, 1.0);
ManVan8 = Van7;
</code></pre>

<p>Making ManVan8 values change from "Medium, 100, 1.0" to "Large, 200, 2.0" but I keep getting a object qualifer error at the operations overload method</p>

<pre><code>    using namespace std;

    class AbstractVan {
    private:
    int RentMin;
    string Drivername;
    long DLno;
    string Capacity;
    float RentRate;

    public:
    AbstractVan(string Drivername, long DLno, string Capacity, int RentMin, float RentRate) : Capacity(Capacity), RentMin(RentMin), RentRate(RentRate), DLno(DLno), Drivername(Drivername) {}

    void setCapacity(string cap) { Capacity = cap; }
    void setRentRate(float rate) {RentRate = rate;}
    void setRentMin(int min) {RentMin = min;}
    string getCapacity() { return Capacity; }
    float getRentRate() { return RentRate; }
    int getRentMin() { return RentMin; }

    virtual void print() = 0;
};
</code></pre>

<p>Derived class from AbstractVan</p>

<pre><code>    class VanIn : public AbstractVan {
    public:
    VanIn(string Capacity, int RentMin, float RentRate) : AbstractVan(Capacity,  RentMin, RentRate) {}

    AbstractVan(string Drivername, long DLno, string Capacity, int RentMin, float RentRate) : Capacity(Capacity), RentMin(RentMin), RentRate(RentRate), DLno(DLno), Drivername(Drivername) {}
</code></pre>

<p>Derived class from VanIn</p>

<pre><code>    class ManVanIn : public VanIn {
    private:
      string Drivername;
      int DLno;
    public:
    ManVanIn(string Drivername, long DLno, string Capacity, int RentMin, float RentRate) : VanIn(Drivername, DLno, Capacity, RentMin, RentRate){}

    void print() { cout &lt;&lt; "Drivername " &lt;&lt; this-&gt;Drivername &lt;&lt; " Registration " &lt;&lt; this-&gt;DLno &lt;&lt; " - " &lt;&lt; getCapacity() &lt;&lt; endl; }
    ~ManVanIn() {cout &lt;&lt; "Destroy ManVanIn" &lt;&lt; endl;}

    void operator = (const VanIn &amp;D) {
        setCapacity(D.getCapacity());
        setRentRate(D.getRentRate());
        setRentMin(D.getRentMin());

    }

};
</code></pre>

<p>Entry</p>

<pre><code>int main()
{

    VanIn Van7("Large", 200, 2.0);
    ManVanIn ManVan8("Abc", 99999, "Medium", 100,1.0);
    ManVan8 = Van7;
    ManVan8.print();
    system("pause");
    return 0;
  };
</code></pre>
