less than 1 minute read

In C++ you declared a method and tried to compile it and boom you get an error like this: extra qualification x on member y. You get this error because you try to declare a method in class definition like this:

class Individual {
public:
	Individual& Individual::operator= (Individual &target);
}```

You cannot declare a method inside a class like this. Instead, remove :: part.

```cpp
class Individual {
public:
	Individual& operator= (Individual &target);
}

Now you are good to go!

Categories:

Updated:

Comments