My Story... : 위치로그 : 태그 : 방명록 : 관리자 : 새글쓰기
My Story... 블로그에 오신것을 환영해요^^
그냥..
71
124
269155

If you encounter problems at runtime with the C library character handling functions from ctype.h,
e.g. isdigit(), toupper(), tolower()
or string conversion functions from stdlib.h,
e.g. atoi(), atof()
or string i/o functions,
e.g. sscanf() and sprintf()
this normally arises because the locale has not been correctly initialised.

A typical problem might be when the call isdigit('1') returns 0 rather than 1.

Most cases of such behaviour are caused by bypassing the C library standard initialization code, e.g. by providing your own __main() function. The best solution to this is to ensure that the C library's initialization code in __rt_lib_init() is called correctly. This will setup locale, and any other C library functions which need to be initialized, automatically.

Alternatively you may be able to work around the problem by using:

  #include <locale.h>
setlocale(LC_ALL,"C");

However this is not recommend, especially as this will pull in additional parts of locale which may not be needed in your system (potentially around 1.4KB extra). It also leaves the possibility of other parts of the C library remaining uninitialized which may lead to later problems.

결론은...
쓰지 말란다...
ㅋㅋ

출처 : http://www.arm.com/support/faqdev/1217.html 

크리에이티브 커먼즈 라이센스
Creative Commons License
이올린에 북마크하기(0) 이올린에 추천하기(0)
04 1, 2006 14:58 04 1, 2006 14:58

위로
http://khunter.zzlzzl.net/trackback/4