vs2005에서 ifstream으로 파일명이 한글로된 파일을 읽지 못하는 문제가 생긴다.
이 때는 아래의 코드를 main에 추가해서 사용하자.
#include < locale > setlocale( LC_ALL, "Korean" ); // Console 화면에 한국어 출력
파일 출력이 한글로 나오지 않을 때,
#include < fstream >
int _tmain(int argc, _TCHAR* argv[])
{
std::locale::global( std::locale("Korean") );
std::wofstream fstream;
fstream.open( _T("Test1.txt") );
fstream << _T("한글 파일 출력 테스트") << std::endl;
fstream.close();
return 0;
}




















