Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <sstream>
- #include <fstream>
- #include <codecvt>
- std::wstring readFile(const char* filename)
- {
- std::wifstream wif(filename);
- std::wstringstream wss;
- wss << wif.rdbuf();
- return wss.str();
- }
- int main()
- {
- std::wstring wstr = readFile("test.txt");
- std::wofstream fs;
- fs.open("wynik.txt", std::ios::out|std::ios::app);
- fs << wstr;
- fs.close();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement