[ create a new paste ] login | about

Link: http://codepad.org/Mn585Q6T    [ raw code | fork ]

C++, pasted on Mar 24:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
struct Arguments {
	const char* title;
	int width;
	int height;
	int style;

	Arguments() : title(""), width(0), height(0), style(0) {}
	Arguments& TitleIs(const char* t) { title = t; return *this; }
	Arguments& WidthIs(int w) { width = w; return *this; }
	Arguments& HeightIs(int h) { height = h; return *this; }
	Arguments& StyleIs(int s) { style = s; return *this; }
};

int create_window(const Arguments& arg) {return 0;}

int main()
{
	create_window(Arguments().TitleIs("test").WidthIs(100).HeightIs(100));
	return 0;
}


Output:
No errors or program output.


Create a new paste based on this one


Comments: