Advertisement
cd62131

print smile

Jul 10th, 2014
358
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.35 KB | None | 0 0
  1. #include <algorithm>
  2. #include <fstream>
  3. #include <iostream>
  4. #include <string>
  5. #include <vector>
  6. using namespace std;
  7. int main() {
  8.   vector<string> pic;
  9.   ifstream in("smile");
  10.   while (in) {
  11.     string s;
  12.     getline(in, s);
  13.     replace(s.begin(), s.end(), '-', ' ');
  14.     pic.push_back(s);
  15.   }
  16.   for (auto& e : pic)
  17.     cout << e << endl;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement