揮発性のメモ2

http://d.hatena.ne.jp/iww/

2016-06-23から1日間の記事一覧

デフォルトコンストラクタが呼ばれない

C++

#include <iostream> using namespace std; class hoge { public: hoge(){ cout << "hello"; } void run(char *text){ cout << text; } }; class piyo { public: piyo(int a){ cout << a << "world"; } void run(char *text){ cout << text; } }; int main() { hoge a(</iostream>…