#include<iostream>
using namespace std;
class PhoneNumber
{
int areacode;
int localnum;
public:
PhoneNumber();
PhoneNumber(const int, const int);
void display() const;
bool valid() const;
void set(int, int);
PhoneNumber& operator=(const PhoneNumber& no);
PhoneNumber(const PhoneNumber&);
};
istream& operator>>(istream& is, const PhoneNumber& no);
istream& operator>>(istream& is, const PhoneNumber& no)
{
int area, local;
cout << "Area Code : ";
is >> area;
cout << "Local number : ";
is >> local;
no.set(area, local);
return is;
}
at no.set(area, local); it says that "the object has type qualifiers that are not compatible with the member function"
what should i do...?