How to initialise a struct-type in the initialisation list?
- by M4design
How can I initilise a structure in the constructor list?
Say:
struct St{int x, y};
class Foo
{
public:
Foo(int a = 0, int b = 0) : /*here initilise st_foo out of a and b*/
{}
private:
const St st_foo;
};