www.pudn.com > cp3.rar > p3-166.cpp
#include#include //main()函数 void main( void ) { //声明字符数组 char ch,string[80],*p; int n; //输入字符串和要查找的字符 cout<<"Test strchr():"< >string; cout<<"ch :"; cin>>ch; //在string中查找ch中的字符并显示 p=strchr(string,ch); cout<<"p :"< >substr; //在string中查找substr中的字符串并显示 p=strstr(string,substr); cout<<"p :"<