Ich öffne Textdatei mit:Was sind die Zeichen am Anfang von std :: ifstream?
std::ifstream in("1.txt");
if(in.good())
{
char ch = 0;
while(!in.eof())
{
in >> ch;
std::cout << std::hex << (short)ch << " ";
}
}
Und ich erhalten drei seltsame Zeichen am Anfang: FFEF FFBB FFBF. Was ist es?
Bitte lesen Sie [warum ist die Verwendung von eof schlecht] (http://stackoverflow.com/questions/5605125/why-is-iostreameof-inside-a-loop-condition-conspired-wrong) –