"this discards qualifiers", what does it mean?
#include <iostream>
using namespace std;
#include <iostream>
using namespace std;
class b
{
public:
void show( b &ob)
{
//this =ob;
cout<<"show";
}
};
int main()
{
b const ob;
b ob1;
ob.show(ob1);
// your code goes here
return 0;
}
prog.cpp: In function ‘int main()’:
prog.cpp:23:14: error: passing ‘const b’ as ‘this’ argument discards qualifiers [-fpermissive]
ob.show(ob1);
^