程序编译没问题,但链接出错。那位高手看看
#include<iostream>
#include<string>
#include<vector>
#include<cctype>
using namespace std;
using std::cout;
using std::cin;
using std::endl;
using std::string;
using std::vector;
void string_to_upper(string &s)
{ for(string::size_type i=0;i!=s.size();i++)
s[i]=toupper(s[i]);
}
int main()
{
string b;
vector<string>a;
while(cin>>b)
a.push_back (b);
for(vector<string>::size_type j=0;j!=a.size();j++)
{ string_to_upper(a[j]);
cout<<b[j]<<" ";
if ((j+1)%8==0) cout<<endl;
}
}