How do I correct these?

And what is the expanded form of Widget(int a) : id(a) {}
Thanks!

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
class Widget {
public:
	//constructors
	Widget() : id_number(0){}
	Widget(int a) : id(a) {}

	//operations
	int id () {return id_number;}
	void operator = (Widget & rhs)
	{
		id_number == rhs.id_number;
	}
	bool operator == (Widget & rhs)
		{ id_number == rhs.id_number;}
	bool operator < (Widget & rhs)
	{
		id_number < rhs.id_number;
	}
protected:
	int id_number;
};
you need to be more specific. what is there to correct? also, what do you mean by the expanded form of the constructor? im not sure it can be "expanded" any more than it is
Topic archived. No new replies allowed.