Advertisement
Guest User

noname

a guest
Oct 25th, 2014
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.38 KB | None | 0 0
  1. //func to change name of file
  2. string change(string nameOfFile)
  3. {
  4.     /* code to change all '.' and '_' to ' ' */
  5.     istringstream in(nameOfFile);
  6.     vector<string> arr;
  7.     string temp;
  8.     while(in >> temp)
  9.     {
  10.         arr.push_back(temp);
  11.     }
  12.     /* change arr elements */
  13.     string result;
  14.     for(auto str : arr)
  15.     {
  16.         result += str + " ";
  17.     }
  18.     /* code to delete last ' ' */
  19.     return result;
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement