This question already has an answer here:
- Member fields, order of construction 2 answers
Say I have a class of the form
class MyClass
{
int a = 1;
int b;
int c;
int d = 4;
MyClass() : b(2)
{
c = 3;
}
}
What is the order of the assignment of a,b,c,d? Now I know for sure (from older C++) that b will be assigned before c. But what about the others with respect to the latter?
EDIT: My question is different than the possible duplicate because I ask about the order priority between body assignment and bracket assignment. Not between different bracket assignments.
EDIT: Again: THIS IS NOT A DUPLICATE FOR WHAT WAS PROVIDED.
Aucun commentaire:
Enregistrer un commentaire