Petr Baudis wrote:
On Thu, Jun 03, 2010 at 04:23:59PM +0200, Per Jessen wrote:
your struct becomes a class
You can keep it a struct...
But can you have constructors for a struct?
When you instantiate the class:
xxxxxx dConfig ( "DPcmd", "tcp" );
...but this is strictly _worse_ than using C89-style initializer - you get the same information value and an extra need to write a constructor and keep it up to date. The poin of C99-style initializers is that you (i) explicitly annotate values by the fields they initialize and (ii) can leave some fields uninitialized.
Completely agree, I wasn't suggesting anyone should do this. /Per Jessen, Zürich -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org