面试
曼曼的青萝
谨记每天要做的事
展开
-
C++面试题之String类的构造函数,析构函数与赋值函数编写
#ifndef __MYSTRING_H_ #define __MYSTRING_H_ #include <iostream> #include <cstring> using namespace std; class MyString { public: char *m_data; public: MyString(const char * ptr=NUL...原创 2018-07-17 09:56:44 · 250 阅读 · 0 评论 -
C++面试之strcpy memcpy memmove实现
目录 -strcpy() - memcpy() - memmove() 0, strcpy函数 函数原型: char *strcpy(char *dest, const char *src); 用法: #include <string.h> 功能:把src所指由NULL结束的字符串复制到dest所指的数组中。 说明:src和dest所指内存区域不可以重叠且des...原创 2018-08-07 15:34:01 · 466 阅读 · 1 评论