Share Pastebin
Guest
Public paste!

jenia

By: a guest | Feb 9th, 2010 | Syntax: None | Size: 0.31 KB | Hits: 28 | Expires: Never
Copy text to clipboard
  1. #include <string>
  2. #include <iostream>
  3. #include <vector>
  4. using namespace std;
  5.  
  6. int read_stdin(vector <string> *s){
  7.   string x;
  8.   while(cin>>x){
  9.     s->push_back(x);
  10.     x.clear();
  11. }
  12.   for(int i=0;i<s->size();i++){
  13.     cout<<(*s)[i];
  14.   }
  15.  
  16. }
  17.  
  18. int main(){
  19.   vector <string> x;
  20.   read_stdin(&x);
  21. }