On program startup, the locale selected is the 'C' locale, which is the same as would be set by calling setlocale(LCALL,'C'). The locale settings selected in the environment can be selected by calling setlocale(LCALL,'). The portions of the current locale affected by a call to this function are specified by argument category. Parameters category. Developer Community for Visual Studio Product family. This site uses cookies for analytics, personalized content and ads. By continuing to browse this site, you agree to this use. (Set Locale) In the C Programming Language. #include Applies To. In the C Language, the setlocale function can be used in the following versions: ANSI/ISO 9899-1990. We use advertisements to support this website and fund the development of new content.
Description
The C library function char *setlocale(int category, const char *locale) Steering wheel ps3 gamestop. sets or reads location dependent information. How to download java on a mac.
Declaration
Following is the declaration for setlocale() function.
Parameters
Return Value
A successful call to setlocale() returns an opaque string that corresponds to the locale set. The return value is NULL if the request cannot be honored.
Example
The following example shows the usage of setlocale() function.
Let us compile and run the above program that will produce the following result −
locale_h.htm
![]()
In the C Programming Language, the setlocale function allows you to set the program's locale information.
Syntax
The syntax for the setlocale function in the C Language is:
Parameters or Arguments
Note
Returns
If locale is a null pointer, the setlocale function returns a pointer to the string associated with category for the current locale. What is lmilaunchagentfixer.app on my mac. If the locale is not a null pointer, the setlocale function returns a pointer to the string associated with category for the new locale.
If the setlocale function fails, a null pointer will be returned.
Required Header
In the C Language, the required header for the setlocale function is:
Applies To
In the C Language, the setlocale function can be used in the following versions:
setlocale ExampleLocale.h Dev C++
When compiled and run on a machine in North America, this application will output:
Similar FunctionsC++ Std Locale
Other C functions that are similar to the setlocale function:
Comments are closed.
|
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |