On Thu, 2010-06-03 at 14:01 +0200, Per Jessen wrote:
G T Smith wrote:
I think I have come across a couple of references suggesting that an object constructor could supply equivalent functionality.
There's no doubt it could, but I think the key thing would be to have the same syntax for C and C++ (in this respect) and to allow C code adhering to C99 to be compiled with g++.
Exactly! What would be the equivalent functionality in g++? I am not a c++ programmer, so a concrete example is needed! The C version of one use is this: typedef struct { const char *CMD_SERVICE, *CMD_TRANSPORT; } dPavueCnfg; dPavueCnfg dConfig = { .CMD_SERVICE = "DPcmd", .CMD_TRANSPORT = "tcp" }; What would I do in C++? -- Roger Oberholtzer OPQ Systems / Ramböll RST Ramböll Sverige AB Krukmakargatan 21 P.O. Box 17009 SE-104 62 Stockholm, Sweden Office: Int +46 10-615 60 20 Mobile: Int +46 70-815 1696 -- To unsubscribe, e-mail: opensuse-programming+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-programming+help@opensuse.org