/* 逐个读取字符串中的字符,当所给字符与字符串中的字符相同时,计数器count的值加1后继续查找,直到字符串尾。 一个完整的参考程序如下: */ #include <iostream> //#include <conio.h> void main() { using namespace std; int count =0; int j; char str[100],c[100]; cout<<"input a string:"; cin>>str; //cout <<sizeof(str)/sizeof(char); cout<< "input another string:"; for(int i = 0; i < *(str+i)!='