Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Borland C++ 2.x ( with Turbo C ) - <b>setlocale() set the locale</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 setlocale()             Set the Locale

 #include   <locale.h>

 char *setlocale(categ, char *locale);
 int categ;             The category (see below)
 char *locale;          New locale

        This function lets you select a locale from these arguments for
        categ:

                LC_ALL  LC_COLLATE  LC_CTYPE  LC_MONETARY
                        LC_NUMERIC    LC_TIME

        Note that C++ supports only the "C" locale, so using
        this function has no effect.

       Returns:     If successful, setlocale() returns a string
                    indicating the previous locale. Otherwise, setlocale()
                    returns a null pointer.

   -------------------------------- Example ---------------------------------

        This program sets the locale to the only one C++ supports,
        the C locale.

        #include <locale.h>
        #include <stdio.h>

        int main(void)
        {

          setlocale(LC_ALL,"C");

          return 0;
         }


See Also: localeconv()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson