字符串拼接
- 实现一个函数,使用指针连接两个字符串。
函数输入: 两个源字符串的指针,目的字符串的指针
demo
#include <iostream>
#include <Windows.h>
#include <string.h>
using namespace std;
/*********************************
函数参数:
str1: 第一个字符串
str2: 第二个字符串
dest: 保存拼接后的字符串
len: dest数组长度
返回值:
true: 真
false: 假
*********************************/
bool str_cat(const ch