setlocale : setlocale « time.h « C Tutorial

Home
C Tutorial
1.Language
2.Data Type
3.String
4.printf scanf
5.Operator
6.Statement
7.Array
8.Function
9.Structure
10.Pointer
11.Memory
12.Preprocessor
13.File
14.Data Structure
15.Search Sort
16.Wide Character String
17.assert.h
18.ctype.h
19.math.h
20.setjmp.h
21.signal.h
22.stdio.h
23.stdlib.h
24.string.h
25.time.h
26.wctype.h
C / ANSI-C
C++
C++ Tutorial
Visual C++ .NET
C Tutorial » time.h » setlocale 
25.10.1.setlocale
ItemValue
Header filelocale.h
Declarationchar *setlocale(int type, const char *locale);
Functionset local information


type must be one of the following macros (defined in ):

  1. LC_ALL: refers to all localization categories.
  2. LC_COLLATE: affects the operation of the strcoll() function.
  3. LC_CTYPE: alters the way the character functions work.
  4. LC_MONETARY: determines the monetary format.
  5. LC_NUMERIC: changes the decimal-point character for formatted input/output functions.
  6. LC_TIME: determines the behavior of the strftime() function.

The setlocale() function returns a pointer to a string associated with the type parameter.

Display the current locale setting:

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

  int main(void)
  {
    printf(setlocale(LC_ALL, ""));

    return 0;
  }
C
25.10.setlocale
25.10.1.setlocale
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.