Created
May 18, 2015 18:47
-
-
Save Youka/d5313cdab9108b73282a to your computer and use it in GitHub Desktop.
MinGW wifstream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <ext/stdio_filebuf.h> // fstream (all sorts of IO stuff) + stdio_filebuf (=streambuf) | |
| #include <fcntl.h> // _O_RDONLY | |
| #include <iostream> // cout | |
| int main(){ | |
| __gnu_cxx::stdio_filebuf<char> wfile_buf(_wopen(L"D:\\...\\の.txt", _O_RDONLY), std::ios_base::in); | |
| std::istream wfile_stream(&wfile_buf); | |
| wfile_stream.seekg(0, std::ios_base::end); | |
| std::cout << wfile_stream.tellg(); | |
| return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment