#include <iostream> class A{ public: mutable int a; void update(int t) const{ a=t; std::cout<<"count: "<<a<<std::endl; }; }; int main() { A ob; ob.update(5); return 0; }
To embed this project on your website, copy the following code and paste it into your website's HTML: