What is the benefit of using constructor initialization lists as opposed to initializing variables in the body of the constructor. I often find the lists confusing and difficult to read when there are lots of variables. But direct statements in the constructor body makes it clear what is happening.
Also, I was told that variables in a constructor initialization list must be listed in the order they were declared in the class. Is that true?
The use of it is dictated by what you're doing in OOP. When a class inherits from another class, sometimes you want to use an initialization list. According to Alex Allain (the author of the above article), each class should only have to initialize things that belong to it. Since inheritance is basically the 'borrowing' of another class's functionality, inherited items should be initialized by the owning class. In that case, you may want an initialization list to supply the inherited class with certain data to meet the needs of your program.
Maybe it would be helpful to point out that every member and base is initialized before the opening brace of the constructor. It's impossible to initialize them within the constructor, it's only possible to replace their values with something else, using assignment where permitted.
If you are going to initialize something, might as well do it right the first time.
Member variables are constructed in the order they are listed in the class, and this happens before the class constructor. Base classes are constructed before derived classes.