I've a variable called val of Type Var.
Var Class have a tostring() methods that returns const string& type.
But When I compile it compiler is firing this Error on the following line.
Code:key+"="+val.toString()+"; at=";Code of toString() methodCode:error: passing ‘const Var’ as ‘this’ argument of ‘const std::string& Var::toString()’ discards qualifiers
Code:const string& Var::toString(){ return (const string&)__data;//__data is of type string (just string not a reference or a const) }



LinkBack URL
About LinkBacks


