You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/c-language/c-language-reference.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,18 +39,17 @@ translation.priority.ht:
39
39
- "zh-tw"
40
40
---
41
41
# C Language Reference
42
-
The *C Language Reference* describes the C programming language as implemented in Microsoft C. The book's organization is based on the ANSI C standard with additional material on the Microsoft extensions to the ANSI C standard.
42
+
The *C Language Reference* describes the C programming language as implemented in Microsoft C. The book's organization is based on the ANSI C standard (sometimes referred to as C89) with additional material on the Microsoft extensions to the ANSI C standard.
43
43
44
44
-[Organization of the C Language Reference](../c-language/organization-of-the-c-language-reference.md)
45
45
46
-
For additional reference material on C++ and the preprocessor, see:
46
+
For additional reference material on C++ and the preprocessor, see:
47
47
48
48
-[C++ Language Reference](../cpp/cpp-language-reference.md)
Copy file name to clipboardExpand all lines: docs/c-language/sizeof-operator-c.md
+15-15Lines changed: 15 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -41,37 +41,37 @@ The `sizeof` operator gives the amount of storage, in bytes, required to store a
41
41
## Syntax
42
42
43
43
```
44
-
45
-
sizeof unary-expression
44
+
sizeof unary-expression
46
45
sizeof ( type-name )
47
46
```
48
47
49
48
## Remarks
50
-
The operand is either an identifier that is a *unary-expression*, or a type-cast expression (that is, a type specifier enclosed in parentheses). The *unary-expression* cannot represent a bit-field object, an incomplete type, or a function designator. The result is an unsigned integral constant. The standard header STDDEF.H defines this type as **size_t**.
49
+
The operand is either an identifier that is a *unary-expression*, or a type-cast expression (that is, a type specifier enclosed in parentheses). The *unary-expression* cannot represent a bit-field object, an incomplete type, or a function designator. The result is an unsigned integral constant. The standard header STDDEF.H defines this type as **size_t**.
51
50
52
-
When you apply the `sizeof` operator to an array identifier, the result is the size of the entire array rather than the size of the pointer represented by the array identifier.
51
+
When you apply the `sizeof` operator to an array identifier, the result is the size of the entire array rather than the size of the pointer represented by the array identifier.
53
52
54
-
When you apply the `sizeof` operator to a structure or union type name, or to an identifier of structure or union type, the result is the number of bytes in the structure or union, including internal and trailing padding. This size may include internal and trailing padding used to align the members of the structure or union on memory boundaries. Thus, the result may not correspond to the size calculated by adding up the storage requirements of the individual members.
53
+
When you apply the `sizeof` operator to a structure or union type name, or to an identifier of structure or union type, the result is the number of bytes in the structure or union, including internal and trailing padding. This size may include internal and trailing padding used to align the members of the structure or union on memory boundaries. Thus, the result may not correspond to the size calculated by adding up the storage requirements of the individual members.
55
54
56
-
If an unsized array is the last element of a structure, the `sizeof` operator returns the size of the structure without the array.
55
+
If an unsized array is the last element of a structure, the `sizeof` operator returns the size of the structure without the array.
57
56
58
57
```
59
58
buffer = calloc(100, sizeof (int) );
60
59
```
61
60
62
-
This example uses the `sizeof` operator to pass the size of an `int`, which varies among machines, as an argument to a run-time function named `calloc`. The value returned by the function is stored in `buffer`.
61
+
This example uses the `sizeof` operator to pass the size of an `int`, which varies among machines, as an argument to a run-time function named `calloc`. The value returned by the function is stored in `buffer`.
In this example, `strings` is an array of pointers to `char`. The number of pointers is the number of elements in the array, but is not specified. It is easy to determine the number of pointers by using the `sizeof` operator to calculate the number of elements in the array. The **const** integer value `string_no` is initialized to this number. Because it is a **const** value, `string_no` cannot be modified.
72
+
In this example, `strings` is an array of pointers to `char`. The number of pointers is the number of elements in the array, but is not specified. It is easy to determine the number of pointers by using the `sizeof` operator to calculate the number of elements in the array. The **const** integer value `string_no` is initialized to this number. Because it is a **const** value, `string_no` cannot be modified.
74
73
75
74
## See Also
76
-
[C++ Built-in Operators, Precedence and Associativity](../cpp/cpp-built-in-operators-precedence-and-associativity)
77
-
75
+
[C Operators](c-operators.md)
76
+
[C++ Built-in Operators, Precedence and Associativity](../cpp/cpp-built-in-operators-precedence-and-associativity.md)
Copy file name to clipboardExpand all lines: docs/c-language/static-storage-class-specifier.md
+3-2Lines changed: 3 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,7 +39,8 @@ translation.priority.ht:
39
39
A variable declared at the internal level with the **static** storage-class specifier has a global lifetime but is visible only within the block in which it is declared. For constant strings, using **static** is useful because it alleviates the overhead of frequent initialization in often-called functions.
40
40
41
41
## Remarks
42
-
If you do not explicitly initialize a **static** variable, it is initialized to 0 by default. Inside a function, **static** causes storage to be allocated and serves as a definition. Internal static variables provide private, permanent storage visible to only a single function.
42
+
If you do not explicitly initialize a **static** variable, it is initialized to 0 by default. Inside a function, **static** causes storage to be allocated and serves as a definition. Internal static variables provide private, permanent storage visible to only a single function.
Copy file name to clipboardExpand all lines: docs/cpp/auto-cpp.md
-1Lines changed: 0 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -141,7 +141,6 @@ int main()
141
141
|[C3531](../error-messages/compiler-errors-2/compiler-error-c3531.md)|A symbol that is declared with the `auto` keyword must have an initializer.|
142
142
|[C3532](../error-messages/compiler-errors-2/compiler-error-c3532.md)|You incorrectly used the `auto` keyword to declare a type. For example, you declared a method return type or an array.|
143
143
|[C3533](../error-messages/compiler-errors-2/compiler-error-c3533.md), [C3539](../error-messages/compiler-errors-2/compiler-error-c3539.md)|A parameter or template argument cannot be declared with the `auto` keyword.|
144
-
|[C3534](../error-messages/compiler-errors-2/compiler-error-c3534.md)|A symbol that is declared with the `auto` keyword in a `new` expression must have an initializer. For more information, see [operator new](new-operator-cpp.md).|
145
144
|[C3535](../error-messages/compiler-errors-2/compiler-error-c3535.md)|A method or template parameter cannot be declared with the `auto` keyword.|
146
145
|[C3536](../error-messages/compiler-errors-2/compiler-error-c3536.md)|A symbol cannot be used before it is initialized. In practice, this means that a variable cannot be used to initialize itself.|
147
146
|[C3537](../error-messages/compiler-errors-2/compiler-error-c3537.md)|You cannot cast to a type that is declared with the `auto` keyword.|
Copy file name to clipboardExpand all lines: docs/cpp/bitwise-exclusive-or-operator-hat.md
+4-5Lines changed: 4 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -46,16 +46,16 @@ expression ^ expression
46
46
```
47
47
48
48
## Remarks
49
-
The bitwise exclusive OR operator (**^**) compares each bit of its first operand to the corresponding bit of its second operand. If one bit is 0 and the other bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.
49
+
The bitwise exclusive OR operator (**^**) compares each bit of its first operand to the corresponding bit of its second operand. If one bit is 0 and the other bit is 1, the corresponding result bit is set to 1. Otherwise, the corresponding result bit is set to 0.
50
50
51
-
Both operands to the bitwise exclusive OR operator must be of integral types. The usual arithmetic conversions covered in [Standard Conversions](standard-conversions.md) are applied to the operands.
51
+
Both operands to the bitwise exclusive OR operator must be of integral types. The usual arithmetic conversions covered in [Standard Conversions](standard-conversions.md) are applied to the operands.
52
52
53
53
## Operator Keyword for ^
54
-
The **xor** operator is the text equivalent of **^**. There are two ways to access the **xor** operator in your programs: include the header file `iso646.h`, or compile with the [/Za](../build/reference/za-ze-disable-language-extensions.md) (Disable language extensions) compiler option.
54
+
The **xor** operator is the text equivalent of **^**. There are two ways to access the **xor** operator in your programs: include the header file `iso646.h`, or compile with the [/Za](../build/reference/za-ze-disable-language-extensions.md) (Disable language extensions) compiler option.
Copy file name to clipboardExpand all lines: docs/cpp/compiler-limits.md
+9-9Lines changed: 9 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -35,23 +35,23 @@ translation.priority.ht:
35
35
# Compiler Limits
36
36
The C++ standard recommends limits for various language constructs. The following is a list of cases where the Visual C++ compiler does not implement the recommended limits. The first number is the limit that is established in the ISO C++ 11 standard (INCITS/ISO/IEC 14882-2011[2012], Annex B) and the second number is the limit implemented by Visual C++:
37
37
38
-
- Nesting levels of compound statements, iteration control structures, and selection control structures [C++ standard: 256] (Visual C++ compiler: depends on the combination of statements that are nested, but generally between 100 and 110).
38
+
- Nesting levels of compound statements, iteration control structures, and selection control structures - C++ standard: 256, Visual C++ compiler: depends on the combination of statements that are nested, but generally between 100 and 110.
39
39
40
-
- Parameters in one macro definition [C++ standard: 256] (Visual C++ compiler: 127).
40
+
- Parameters in one macro definition - C++ standard: 256, Visual C++ compiler: 127.
41
41
42
-
- Arguments in one macro invocation [C++ standard: 256] (Visual C++ compiler 127).
42
+
- Arguments in one macro invocation - C++ standard: 256, Visual C++ compiler 127.
43
43
44
-
- Characters in a character string literal or wide string literal (after concatenation) [C++ standard: 65536] (Visual C++ compiler: 65535 single-byte characters, including the `null` terminator, and 32767 double-byte characters, including the `null` terminator).
44
+
- Characters in a character string literal or wide string literal (after concatenation) - C++ standard: 65536, Visual C++ compiler: 65535 single-byte characters, including the `null` terminator, and 32767 double-byte characters, including the `null` terminator.
45
45
46
-
- Levels of nested class, structure, or union definitions in a single `struct-declaration-list`[C++ standard: 256] (Visual C++ compiler: 16).
46
+
- Levels of nested class, structure, or union definitions in a single `struct-declaration-list`- C++ standard: 256, Visual C++ compiler: 16.
47
47
48
-
- Member initializers in a constructor definition [C++ standard: 6144] (Visual C++ compiler: at least 6144).
48
+
- Member initializers in a constructor definition - C++ standard: 6144, Visual C++ compiler: at least 6144.
49
49
50
-
- Scope qualifications of one identifier [C++ standard: 256] (Visual C++ compiler: 127).
50
+
- Scope qualifications of one identifier - C++ standard: 256, Visual C++ compiler: 127.
51
51
52
-
- Nested `extern` specifications [C++ standard: 1024] (Visual C++ compiler: 9 (not counting the implicit `extern` specification in global scope, or 10, if you count the implicit `extern` specification in global scope.).
52
+
- Nested `extern` specifications - C++ standard: 1024, Visual C++ compiler: 9 (not counting the implicit `extern` specification in global scope, or 10, if you count the implicit `extern` specification in global scope..
53
53
54
-
- Template arguments in a template declaration [C++ standard: 1024] (Visual C++ compiler: 2046).
54
+
- Template arguments in a template declaration - C++ standard: 1024, Visual C++ compiler: 2046.
0 commit comments