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++?