1、将全局变量的定义移动到main函数中;2、将count函数修改为void count(char str[], int &letter, int &didit, int &space, int &others){.....}
使用局部变量并通过指针将地址传给count函数,改变变量的值