Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

update variable in const function C++

//declare x mutable
class A (){
   mutable int x;
public:
   void func () const {
      //change value of x here
   }
}; 
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #update #variable #const #function
ADD COMMENT
Topic
Name
3+3 =