String类的结构设计符号重载
String类的 运算符重载
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
using namespace std;
class String
{
char* c_str;
public:
//构造,包含无参构造
String(const char* str="")
{
//利用malloc的方法 没有运用new是考虑到后面的
原创
2021-04-13 09:59:28 ·
121 阅读 ·
0 评论