My question is related to the Prasoon question about non-POD types and value initialization.
I tried the following code for online compilers such as Ideone and Codepad, but the executables displayed a runtime error on both sites.
#include <iostream> #include <cassert> struct Struct { std::string String; int Int; bool k; }; struct InStruct:Struct { InStruct():Struct(){} }; int main() { InStruct i; assert ( i.Int == 0); std::cout << "Hello"; }
Ideone exit here
Codepad Output here
Does this mean that none of them supports the C ++ 03 value initialization function?
c ++ value-initialization codepad
Innocent boy
source share