Questions often contain wrong information. Askers are typically the least likely to get details right, since they are almost by definition the least knowledgeable about the topic. When researching solutions, you should not blindly trust code that appears in questions.
It is generally not appropriate to suggest edits that fix mistakes in code that appears in questions, since wrong code and wrong assumptions are essentially the whole point of a question. Furthermore, one or more of the answers may have discussed that wrong code/assumption, so modifying it in the question will invalidate those answers, thus confusing everyone even more.
When researching a problem, I recommend reading and trying what is recommended in the answers, not what is recommended in the question.
For what it's worth, that code is definitely wrong. I don't know where they got the idea that would work—I hope it wasn't presented as a solution on Stack Overflow! It wouldn't be allowed by the grammar; it would be interpreted as a function declaration, not a constructor call for the purposes of initialization. You could make it compile by moving to the uniform initialization syntax introduced with C++11; e.g.:
class MyClass {
public:
MyClass(int n);
private:
AnotherClass another{100}; // construct AnotherClass right away!
};
Note that the parentheses surrounding the constructor arguments have been replaced with braces, which prevents this from being parsed as a function declaration.
But editing wrong code in questions is not going to reduce any confusion. In particular, if I were to change it to that now, it could be taken by future viewers to imply that the asker is targeting C++11 or later, which could change the entire nature and scope of the question.
I've tried to carefully edit the explanation preceding that code block in order to clarify that it may not be working code, without changing the meaning of the question or potentially invalidating any of the answers. Luckily, that leading contextual example was not material to the question proper.