Skip to content

Latest commit

 

History

History
73 lines (71 loc) · 4.1 KB

File metadata and controls

73 lines (71 loc) · 4.1 KB
title Global Variables | Microsoft Docs
ms.custom
ms.date 11/04/2016
ms.reviewer
ms.suite
ms.technology
cpp-standard-libraries
ms.tgt_pltfrm
ms.topic article
f1_keywords
c.variables
dev_langs
C++
helpviewer_keywords
global variables
variables, global
global variables, Microsoft run-time library
ms.assetid 01d1551c-2f0c-4f72-935c-6442caccf84f
caps.latest.revision 15
author corob-msft
ms.author corob
manager ghogen
translation.priority.ht
cs-cz
de-de
es-es
fr-fr
it-it
ja-jp
ko-kr
pl-pl
pt-br
ru-ru
tr-tr
zh-cn
zh-tw

Global Variables

The Microsoft C run-time library provides the following global variables or macros. Several of these global variables or macros have been deprecated in favor of more-secure functional versions, which we recommend you use instead of the global variables.

Variable Description
__argc, __argv, __wargv Contains the command-line arguments.
_daylight, _dstbias, _timezone, and _tzname Deprecated. Instead, use _get_daylight, _get_dstbias, _get_timezone, and _get_tzname.

Adjusts for local time; used in some date and time functions.
errno, _doserrno, _sys_errlist, and _sys_nerr Deprecated. Instead, use _get_errno, _set_errno, _get_doserrno, _set_doserrno, perror and strerror.

Stores error codes and related information.
_environ, _wenviron Deprecated. Instead, use getenv_s, _wgetenv_s, _dupenv_s, _wdupenv_s, _putenv_s, and _wputenv_s.

Pointers to arrays of pointers to the process environment strings; initialized at startup.
_fmode Deprecated. Instead, use _get_fmode or _set_fmode.

Sets default file-translation mode.
_iob Array of I/O control structures for the console, files, and devices.
_pctype, _pwctype, _wctype, _mbctype, _mbcasemap Contains information used by the character-classification functions.
_pgmptr, _wpgmptr Deprecated. Instead, use _get_pgmptr or _get_wpgmptr.

Initialized at program startup to the fully-qualified or relative path of the program, the full program name, or the program name without its file name extension, depending on how the program was invoked.

See Also

C Run-Time Library Reference
Global Constants
__argc, __argv, __wargv
_get_daylight
_get_dstbias
_get_timezone
_get_tzname
perror
strerror
_get_doserrno
_set_doserrno
_get_errno
_set_errno
_dupenv_s, _wdupenv_s
getenv, _wgetenv
getenv_s, _wgetenv_s
_putenv, _wputenv
_putenv_s, _wputenv_s
_get_fmode
_set_fmode