Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Apr 1st, 2011  |  syntax: C++  |  size: 0.76 KB  |  views: 68  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. void link(vector<string> entries) { // entries contains several strings (each will contain about 25 elements) that need to be splitted
  2.  
  3.   for (int j = 0; j < entries.size(); ++j) {
  4.  
  5.       string entry = entries[j];
  6.      
  7.       // vector<string> elementsInEntry;
  8.       // old split function
  9.  
  10.       test_custom< vector<string_view> > (entry); // No return value
  11.  
  12.       typedef string::const_iterator iter;
  13.       typedef boost::iterator_range<iter> string_view;
  14.  
  15.       for (int i = 0; i < elementsInEntry.size(); ++i) {
  16.         singleElements[elementsInEntry[i]].push_back(myID); // Won't find elementsInEntry
  17.         // strings in singleElements[] are needed later because I need the function string::find() and some more functions string provides
  18.       }
  19.  
  20.   }
  21.  
  22. }
clone this paste RAW Paste Data