第八周 專案3 3 刪除字元

2021-07-06 02:35:36 字數 958 閱讀 6715

/*

檔名稱:main.cpp

作者       :王超

完成日期:2023年10月23日

問題描述:從串s 中刪除其值等於c的所有字元

*/#include

#include "sqstring.h"

int main()

#include

#include

#include "sqstring.h"

void dellchar(sqstring &s, char c)

sqstring;

void dellchar(sqstring &s, char c);

void strassign(sqstring &s,char cstr);    //字串常量cstr賦給串s

void strcopy(sqstring &s,sqstring t);   //串t複製給串s

bool strequal(sqstring s,sqstring t); //判串相等

int strlength(sqstring s);  //求串長

sqstring concat(sqstring s,sqstring t);  //串連線

sqstring substr(sqstring s,int i,int j); //求子串

sqstring insstr(sqstring s1,int i,sqstring s2); //串插入

sqstring delstr(sqstring s,int i,int j) ;   //串刪去

sqstring repstr(sqstring s,int i,int j,sqstring t);     //串替換

void dispstr(sqstring s);   //輸出串

第八周 專案3 3

檔名稱 main.cpp 作者 孫彩虹 完成日期 2015年11月16日 問題描述 從串s中刪除其值等於c的所有字元。include ifndef sqstring h included define sqstring h included define maxsize 100 最多的字元個數 ty...

第八周 專案2

程式的版權和版本宣告部分 檔名稱 object.cpp 完成日期 2013年 4 月 23日 版本號 v1.0 輸入描述 無 問題描述 程式輸出 略。include using namespace std class ctime void settime int h,int m,int s void...

第八周 專案3 2

檔名稱 main.cpp 作者 孫彩虹 完成日期 2015年11月16日 問題描述 試編寫演算法,實現將已知字串所有字元倒過來重新排列。include ifndef sqstring h included define sqstring h included define maxsize 100 最...