잡담
-
문득 fopen 파일이 안열려요 질문에-ㅅ- 음!?잡담 2012. 5. 11. 15:15
windows visual studio c/c++ 에서는 파일경로가 참 아름다운(????) 모습이어도 fopen 으로 잘 열어준다. (한글 혹은 유니코드 경로일때는 w 계열 함수를 사용하는건 당연한 이야기. 음.. 뭔가 더 있었던가...) void FileOpenTest(const char* path) { printf("[%s] - 테스트\n -> ", path); FILE* fp = fopen(path, "rb"); if (NULL == fp) { printf("실패\n"); return; } printf("성공\n"); fclose(fp); } void main() { FileOpenTest("path to/test.txt"); FileOpenTest("path to\\test.txt"); FileO..