なぜか、文字化けが発生してしまいます
原因は何でしょうか?
#include <stdio.h> #include <vector> using namespace std; static vector<char> v; void load() { FILE *file = fopen( "iGoogle.txt", "rb" ); char buf[256]; while( !feof(file) ) { // 文字化けして取得している fgets( buf, sizeof(buf), file ); printf( buf ); } fclose( file ); } int main() { load(); return 0; }