Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CPP

warning: base will be initialized after

// Make sure the members appear in the initializer list in the same order as they appear in the class
Class C {
   int a;
   int b;
   C():b(1),a(2){} //warning, should be C():a(2),b(1)
}
// or you can turn -Wno-reorder
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #base #initialized
ADD COMMENT
Topic
Name
3+9 =