Answer by Stephan Lechner for C++ - member variable aggregate initialization
Statement LUID test = {0, 0} is an initialization of a local variable using an initialization list; this is valid, as it is used in the course of a variable definition. test = {0, 0}, in contrast, is...
View ArticleC++ - member variable aggregate initialization
In the following code:class Class{private:LUID luid;public:Class(){luid = { 0, 0}; // A. Does not compileLUID test = {0, 0}; // B. Compilestest = {1,1}; // C. Does not compile}Why are A and C not...
View Article
More Pages to Explore .....