12345678910
class Foo { public: Foo(int, float, char, whatEverElseYouNeed); } Foo::Foo(...) { //Code }
1234567891011121314
#ifndef ONE_H #define ONE_H class One { public: One(int a, int b); private: int x; int y; }; #endif // ONE_H
123456
#include "One.h" One::One(int a, int b) : x(a), y(b) { }
12345678910111213
#ifndef TWO_H #define TWO_H #include "One.h" class Two { public: Two(); private: One one_object[2]; }; #endif // TWO_H
12345678
#include "Two.h" #include "One.h" Two::Two() : one_object[0](1,1), one_object[1](2,2) { }
123456789101112
struct A { A( int ii, double dd ) : i(ii), d(dd) {} int i ; double d ; }; struct B { B() : array{ { 1, 2.3 }, { 4, 5.6 }, { 7, 8.9 }, { 0, 0 } } {} A array[4] ; };