📜  初始化列表 C++ 代码示例

📅  最后修改于: 2022-03-11 14:44:48.730000             🧑  作者: Mango

代码示例1
class Example {
public:
    int m_A, m_B, m_C;
    Example(int a, int b, int c);
};

Example::Example(int a, int b, int c):
    // This is an initializer list
    m_A(a),
    m_B(b),
    m_C(c)
{ /* Constructor code */ }