Answer by Michael Karcher for Is aggregate initialization with a new struct...
That code will allocate memory for a new Struct and initialize the members with 1, 2 and 3, and finally put the pointer to that structure into the variable a. I have no idea whether you call that...
View ArticleIs aggregate initialization with a new struct valid?
Would a phrase such as Struct* a = new Struct{1,2,3}; be valid?It compiles and runs just fine, but I'm wondering if there's anything funky going on behind the scenes.struct Struct { int a; int b; int c;}
View Article
More Pages to Explore .....