概述
例子:“aaaabcaa”,查找a则返回值为0,长度为4;
#include <iostream>
#include <stdio.h>using namespace std;
int find_max_repeat(char *str, char ch, int *len)
{
char *p=str;
int num(0),start(0);
while(*p!='
例子:“aaaabcaa”,查找a则返回值为0,长度为4;
#include <iostream>
#include <stdio.h>