codepad
[
create a new paste
]
login
|
about
Language:
C
C++
D
Haskell
Lua
OCaml
PHP
Perl
Plain Text
Python
Ruby
Scheme
Tcl
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; }
Private
[
?
]
Run code
Submit