Thanks, but that i am aware of this and in my classes and structures i use constructors.
The problem is just, that i write some different web-based applications and now i am reconsidering the design of the implementation.
Since this is a border between C and C++, the POSIX standard defines structures like addrinfo without constructors or destructors (so it is C-compatible).
Maybe i should ask more specific: How can I initialize a struct, so its members are zero'd without to be able to use constructors, in a safe manner for sure. (means bytewise 0x00 everything)
But thank you again for this fast answer,
Maikel
Edit:
this is not a so very specific question, because e.g. addrinfo needs to be zero'd before i can use the function getaddrinfo(...). This is the 'new' POSIX resolving way of hostnames to determine dynamicly if it is capable of IPV6 or IPV4 and so on..
Even so, i found a way like this:
But this has surpised me, and now my real question is: Is this standard behaviour for POD-structs? I cannot find answers at google (but im sure i googled not enough)
Edit2:
My problem with POD-structs in C++ and memset or ZeroMemery is following:
POD-structs contain afaik some padding, which C-structs do not. Thats why i thought memset and ZeroMemory are not garanteed to work as expected on these. Am I wrong?