摘要: #include class String{ public: String(const String& str); String(const char* str); private: char* m_data; }; String::String(const String& str) { int len = strlen(str.m_data) + 1;//在... 阅读全文
posted @ 2017-02-28 18:27 zzyoucan 阅读(229) 评论(0) 推荐(0) 编辑
摘要: #include template class SquareMatrix{ public: void invert(); }; template void SquareMatrix::invert() { T num = n * 5; } int main() { SquareMatrix a; a.invert(); return 0; } 阅读全文
posted @ 2017-02-28 17:53 zzyoucan 阅读(142) 评论(0) 推荐(0) 编辑