例如字符串aabbbc,插入字符个数后变成aa2bbb3c1
#include <iostream> #include <string.h> using namespace std; char * strInsertCount (const char * str) { if (str==NULL) return NULL; char * retStr = new char[strlen(str)*2+1]; char * p = retStr; int count = 1; while ((*p++=*str++) != '