Here is declaration for the Cpmv class: class Cpmv { public: struct Info { std::string qcode; std::string

Question:

Here is declaration for the Cpmv class:
class Cpmv
{
public:
struct Info
{
std::string qcode;
std::string zcode;
};
private:
Info *pi;
public:
Cpmv();
Cpmv(std::string q, std::string z);
Cpmv(const Cpmv & cp);
Cpmv(Cpmv && mv);
~Cpmv();
Cpmv & operator=(const Cpmv & cp);
Cpmv & operator=(Cpmv && mv);
Cpmv operator+(const Cpmv & obj) const;
void Display() const;
};
The operator+() function should create an object whose qcode and zcode members concatenate the corresponding members of the operands. Provide code that implements move semantics for the move constructor and the move assignment operator.Write a program that uses all the methods. For testing purposes, make the various methods verbose so that you can see when they are used.

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question

C++ Primer Plus

ISBN: 9780321776402

6th Edition

Authors: Stephen Prata

Question Posted: