I'm trying to read a Unicode file using std::wifstream. On wintel.
#include <iostream>
#include <fstream>
#include <string>
using namespace std;
int main()
{
wifstream File("input.txt");
wstring Line;
while(!File.eof() )
{
getline(File, Line);
wcout << Line << endl;
}
system("pause");
return 0;
}
And this is my output
■A s e q u e n c e o f l e x i c o n s t h a t m a k e u p a s
e n t e n c e .
Press any key to continue . . .
Now the spaces between each character and the '■' thing at the start arn't in the text file. What am I doing wrong?