// Method One
class ClassName
{
public:
ClassName() : m_vecInts() {}
private:
std::vector<int> m_vecInts;
}
// Method Two
class ClassName
{
public:
ClassName() {} // do nothing
private:
std::vector<int> m_vecInts;
}
Question> 初始化类的vector成员变量的正确方法是什么?我们是否必须初始化它?