cout << file.getc() << file.getc() << file.getc() << file.getc() << file.getc();

これに"hello"と与えて"hello"と出力される保証はないということか?