C++11 Delegate Construction
#define_crt_secure_no_warnings#include<iostream>#include<string>#include<vector>#include<map>//like the delegate construct and the inheritance constructor, the delegate constructor is also an improvement to the C + + constructor in C++11, which is also intended to reduce the time that programmers write constructors. //if a class contains more than one constructor, C + + 11 allows another constructor to be used in the definition in one constructor, but this must be done through the initialization list, as follows:classinfo{ Public: info (): info (1) { }//Delegate ConstructorsInfo (inti): Info (i,'a') { }//is both the target constructor and the delegate constructorInfo (CharE): Info (1, E) { }Private: Info (intICharE): Type (i), name (e) {/*Other Initialization*/}//Target Constructors inttype; Charname; // ...};voidmytest () {return;}intMain () {mytest (); System ("Pause"); return 0;}
C++11 Delegate Construction