B
better_cs_now
Hello all,
In this code:
class Bar {
public:
Bar(int) {} // ***Not default constructible***
};
class Foo {
public:
Foo() : m_Bar({Bar(1), Bar(2)}) {} // Not syntactically correct!
private:
Bar m_Bar[2];
};
What is the proper way to initialize m_Bar? Thanks to all!
Best,
Dave
In this code:
class Bar {
public:
Bar(int) {} // ***Not default constructible***
};
class Foo {
public:
Foo() : m_Bar({Bar(1), Bar(2)}) {} // Not syntactically correct!
private:
Bar m_Bar[2];
};
What is the proper way to initialize m_Bar? Thanks to all!
Best,
Dave