In Abc.hpp file the following information is defined:
class Abc: public A
{
enum Ac { VAR };
struct L{
std::string s1;
::Class2::ID type;
unsigned s;
bool operator==(const L& l) const { return (type==l.type)&&(s==l.s)&&(s==l.s); }
};
class SS
{
public:
virtual ~SS();
};
class IS {
public:
/// Destructor
virtual ~IS();
};
class HashIndexImplementation;
class HashIndex;
void func(){}
Abc& operator=(Abc&) {
cout << "A::operator=(A&)" << endl;
return *this;
} //It gives me the error that the token '{' is not recognized
Abc(Class2 & part);
};
For the above class aim at assigning with another class the following information for my purpose:
Abc d;
static Abc f;
f=d;
However, the code that I have written above does not work...The error that it throws is:
no matching function for call to Abc::Abc()
EDIT: I am dealing with an entire hierarchy of classes therefore if I add on another constructor like Abc() then am forced to do changes in as many as 20 more classes...is there no other way which can be used for assignment. Is there some means by which I may incorporate the other constructor.