Comment initier une structure dans la liste des constructeurs?Comment initialiser un type struct dans la liste d'initialisation?
Dis:
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;
};
Merci, je l'ai maintenant le code fonctionne maintenant.. – m4design