a只是一个字符串而已,不是数组啊。string a[10];string *str = a;
写成str[105]这种应该可以吧干嘛用指针呢?你不是存储的是数组吗?
str是指向字符串的指针。str[i]是一个字符 不能用getline输入字符