#include
#include
using namespace std;
int count(const char *p)
{
if( p == NULL) return 0;
int cnt = 0;
while(*p)
{
if(*p >='a' && *p <= 'z')
cnt++;
p++;
}
return cnt;
}
int main()
{
string str;
cout<<"请输入字符串:"<
const char *p = str.c_str();
cout<<"字符串中小写字母个数:"<
}
调试运行成功,有问题追问!
是只要写理论还是?