#include<iostream>
#include<vector>
#include<string>
using namespace std;
int main()
{
string word,s;
vector<string*> vec;
cout<<"enter some strings:"<<endl;
while(cin>>word)
{
vec.push_back(&word);
s+=word;
cout<<word.size()<<" ";
}
cout<<endl;
for(vector<string*>::iterator it=vec.begin();it!=vec.end();++it)
cout<<*it<<" ";
cout<<endl;
return 0;
}
#include<vector>
#include<string>
using namespace std;
int main()
{
string word,s;
vector<string*> vec;
cout<<"enter some strings:"<<endl;
while(cin>>word)
{
vec.push_back(&word);
s+=word;
cout<<word.size()<<" ";
}
cout<<endl;
for(vector<string*>::iterator it=vec.begin();it!=vec.end();++it)
cout<<*it<<" ";
cout<<endl;
return 0;
}