using namespace std;
using std::vector;
int main()
{
vector words;
string input;
while (getline(cin,input)){
words.push_back(input);
for (decltype(words.size()) n = 0; n != words.size(); n++){
auto temp = words[n];
if (isalpha(words[n]))
}
}
system("pause");
}
程序没写完,words[n]下面有红线,说string类型不能转换为int,我想问这个words[n]到底是什么类型啊,鼠标放在auto temp显示的类型是char,为什么下面的words[n]变成string了
而且把auto temp和if这两行去掉换成直接输出cout<<words[n]; 以后虽然没有语法错误但是无法运行呢
跪求大神解答~~!