物理の駅 Physics station by 現役研究者

テクノロジーは共有されてこそ栄える

C++でコンストラクターを別のコンストラクターから呼ぶ方法 (C++11以上)

Can I call a constructor from another constructor (do constructor chaining) in C++?

stackoverflow.com

class Foo {
public: 
  Foo(char x, int y) {}
  Foo(int y) : Foo('a', y) {}
};