#include #include using namespace std; template class CardT{ public: CardT(T argData): data{"Mr. " + argData} {} T GetData(void) const { return data;} private: T data; }; class PersonT { public: PersonT(string argName): name{argName}, idCard{name}, BIG_VALUE{idCard.GetData().size()}{}; /*PersonT(string argName){ name = argName; idCard{name}; BIG_VALUE = 8; } */ CardTGetCard() { return idCard; } string GetName(void) const {return name;} private: string name; CardT idCard; public: const size_t BIG_VALUE; }; int main() { PersonT bob{"Bob"}; cout << "The person is " << bob.GetName() << endl; cout << "The ID Card says " << bob.GetCard().GetData() << endl; cout << "The big value is " << bob.BIG_VALUE << endl; return 0; }