Advertisement
Guest User

Untitled

a guest
Nov 22nd, 2014
207
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.28 KB | None | 0 0
  1. #include <iostream>
  2. #include <fstream>
  3. #include <iterator>
  4.  
  5. std::vector<char> read_file(const std::string& fname)
  6. {
  7.     std::ifstream inp(fname);
  8.     return std::vector<char>(std::istreambuf_iterator<char>(inp),
  9.                              std::istreambuf_iterator<char>());
  10. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement