#include <iostream> #include <cstdio> #include <cstring> using namespace std; template <class T> class A; template <class T> ostream &operator<<(ostream &out, const A<T>&obj); template <class T> class A{ public: A(int i):data(i){} friend ostream& operator<< <>(ostream &out, const A<T>&obj); private: T data; }; template <class T> ostream &operator<<(ostream &out, const A<T>&obj) { out<<obj.data; return out; } class String{ public: //构造函数 String(const char* str = NULL){ if(str == NULL){ m_data = new char[1]; m_data[0]='