C++ Mutable
What is need for Mutable? Data members cannot be changed in const objects. In some scenarios this is required and mutable keyword provides the solution. Demonstrate the usage of mutable keyword #include <iostream>using namespace std;class MyClass {mutable int x;int y;public:MyClass (int a, int b){x=a;y=b;}void SetX(int a) const{x=a;}void SetY(int b) const{/* Compilation Errory=b;Error E2024 mutable.cpp 21: …