May 2017
Intermediate to advanced
590 pages
17h 18m
English
The initial control class had a constructor with many parameters. In real-world code, you can find examples like this where the number of parameters is much higher. A possible solution, often found in practice, is to group common Boolean type properties in bit flags, that could be passed together as a single integral argument (an example could be the border style for a control that defines the position where the border should be visible: top, bottom, left, right, or any combination of these four). Creating a control object with the initial implementation is done like this:
control c(1044, "sample", 100, 20, true);
The named parameter idiom has the advantage that it allows you to specify values only for the parameters that ...
Read now
Unlock full access