
2 Sep
2010
2 Sep
'10
6:59 a.m.
On 01.09.2010 14:37, Stewart, Robert wrote:
Here are a couple of thoughts on how you might solve the dilemma:
Try the Named Constructor Idiom. One can choose which behavior one wants by invoking a static member function with a suggestive name and requiring whatever arguments are appropriate and returning an instance of the class. That's often clearer than overloading constructors.
If it is possible to determine whether a Windows app is being built as a console app versus a GUI app, then you could conditionally compile for one or the other, thus keeping a Windows developer from choosing incompatible behavior.
Sounds good, thanks! Wolfgang