C++
Programming and Technical
Logical Reasoning
Blood Relations
Is there anything wrong with this C++ class declaration?
class temp
{
int value1;
mutable int value2;
public :
void fun(int val)
const{
((temp*) this)->value1 = 10;
value2 = 10;
}
};
Read Solution (Total 1)
-
- we should declare temp as a data member separately
- 3 years agoHelpfull: Yes(0) No(0)
C++ Other Question