2016年8月18日

自实现部分string类的功能

摘要: #define _CRT_SECURE_NO_WARNINGS #include using namespace std; class MyString { public: MyString::MyString(); //无参构造 MyString(const char* str ); //默认参数 MyString(const MyString... 阅读全文

posted @ 2016-08-18 23:09 路之遥_其漫漫 阅读(157) 评论(0) 推荐(0) 编辑

C语言 (内存) 四道经典题目

摘要: 1 void GetMemory(char *p) 2 { 3 p = (char *)malloc(100); "没有释放内存" 4 } 5 void Test(void) 6 { 7 char *str = NULL; 8 GetMemory(str); 9 strcpy(str, "hello world"); ... 阅读全文

posted @ 2016-08-18 22:15 路之遥_其漫漫 阅读(477) 评论(0) 推荐(0) 编辑

导航