SHARE
TWEET

Untitled

a guest Nov 19th, 2019 94 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include <sstream>
  2. #include <fstream>
  3. #include <codecvt>
  4.  
  5. std::wstring readFile(const char* filename)
  6. {
  7.     std::wifstream wif(filename);
  8.     std::wstringstream wss;
  9.     wss << wif.rdbuf();
  10.     return wss.str();
  11. }
  12.  
  13. int main()
  14. {
  15.     std::wstring wstr = readFile("test.txt");
  16.  
  17.     std::wofstream fs;
  18.     fs.open("wynik.txt", std::ios::out|std::ios::app);
  19.  
  20.     fs << wstr;
  21.  
  22.     fs.close();
  23. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top