?? 5_20.cpp
字號:
#include<iostream.h>
int main()
{
void del_chr(char *p,char c);
char s[80],c;
cout<<"請輸入字符串:"<<endl;
cin>>s;
cout<<"請輸入要刪除的字符:"<<endl;
cin>>c;
del_chr(s,c);
cout<<s<<endl;
return(0);
}
void del_chr(char *p,char c)
{
char *q;
for(q=p;*q!='\0';q++)
if(*q!=c)
*p++=*q;
*p='\0';
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -