void?CompressStrInPlace(char*?str)

{
????if?((0?==?str)?||?('\0'?==?*str))
????
{
????????return?;
????}
????char*?p?=?str?+?1;
????char?temp[11];
????int?rep?=?0;
????char*?sNum?=?0;
????while?(*p?!=?'\0')
????
{
????????if?(*str?!=?*p)
????????
{
????????????*(++str)?=?*p++;
????????}
????????else
????????
{
????????????while?(*p?==?*str)
????????????
{
????????????????++rep;
????????????????++p;
????????????}
????????????if?(rep?<?10)
????????????
{
????????????????*(++str)?=?rep?+?'0';?//?30h
????????????}
????????????else
????????????
{
????????????????char*?sNum?=?itoa(rep,?temp,?10);
????????????????while?((*(++str)?=?*sNum++)?!=?'\0')
????????????????????/**//*null*/;
????????????????--str;
????????????}
????????????rep?=?0;
????????}//if-else
????}//while
????*(++str)?=?'\0';
}

