摘要: vector类的简单实现 阅读全文
posted @ 2017-07-27 23:13 wxquare 阅读(835) 评论(0) 推荐(2) 编辑
摘要: 1.int atoi(const char* src) nullptr指针 空白字符' ','\t','\n' 符号位 避免值溢出 出错信息保存在全局变脸errnum中 2. char* itoa(int val,char* buf,size_t radix) 指针有效性判断 符号位 基数(10,1 阅读全文
posted @ 2017-07-27 17:11 wxquare 阅读(429) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 using namespace std; 4 5 6 class CString { 7 private: 8 char* m_pdata; 9 public: 10 CString(const char* ptr = nullptr) { 11 if (ptr == nullptr) m... 阅读全文
posted @ 2017-07-27 14:54 wxquare 阅读(737) 评论(0) 推荐(0) 编辑
摘要: 1 #include 2 #include 3 #include 4 using namespace std; 5 6 7 struct TreeNode{ 8 int val; 9 TreeNode* left; 10 TreeNode* right; 11 TreeNode(int x):val(x),left... 阅读全文
posted @ 2017-07-27 10:45 wxquare 阅读(859) 评论(0) 推荐(0) 编辑