I have a friend which is not a best programmer and I could even say he doesn’t like programming at all. He had to develop a small application which has one class named “Rectangle” and performs some operations with rectangles.

I’ve helped him with the project and the final application contained the following lines of code:

class Rectangle
{
    private:
        int x1, y1, x2, y2;
        //... some other fields
    public:
        Rectangle(int x1, int y1, int x2, int y2);
        // ... other constructors and methods
}

The professor looked over the code and said: “You can’t declare two variables with the same name, one as a field and one as a parameter, in the same class. Your code will not compile.”… <Straight face> … and (s)he is [I don't want to disclose (s)he's identity] a university professor… and teaches C++.