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
{{ message }}
Repository navigation
Commit 348e732
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: docs/c-runtime-library/data-conversion.md
+2-1Lines changed: 2 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -52,7 +52,8 @@ These routines convert data from one form to another. Generally these routines e
52
52
|[_fcvt](../c-runtime-library/reference/fcvt.md), [_fcvt_s](../c-runtime-library/reference/fcvt-s.md)|Convert `double` to string with specified number of digits following decimal point|[System::Convert::ToString](https://msdn.microsoft.com/en-us/library/system.convert.tostring.aspx)|
53
53
|[_gcvt](../c-runtime-library/reference/gcvt.md), [_gcvt_s](../c-runtime-library/reference/gcvt-s.md)|Convert `double` number to string; store string in buffer|[System::Convert::ToString](https://msdn.microsoft.com/en-us/library/system.convert.tostring.aspx)|
54
54
|[_itoa, _i64toa, _ui64toa, _itow, _i64tow, _ui64tow](../c-runtime-library/reference/itoa-i64toa-ui64toa-itow-i64tow-ui64tow.md), [_itoa_s, _i64toa_s, _ui64toa_s, _itow_s, _i64tow_s, _ui64tow_s](../c-runtime-library/reference/itoa-s-i64toa-s-ui64toa-s-itow-s-i64tow-s-ui64tow-s.md)|Convert `int` or `__int64` to string|[System::Convert::ToString](https://msdn.microsoft.com/en-us/library/system.convert.tostring.aspx)|
55
-
|[labs](../misc/labs-llabs.md)|Find absolute value of `long` integer|[System::Math::Abs](https://msdn.microsoft.com/en-us/library/system.math.abs.aspx)|
55
+
|[labs](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Find absolute value of `long` integer|[System::Math::Abs](https://msdn.microsoft.com/en-us/library/system.math.abs.aspx)|
56
+
|[llabs](../c-runtime-library/reference/abs-labs-llabs-abs64.md)|Find absolute value of `long long` integer|[System::Math::Abs](https://msdn.microsoft.com/en-us/library/system.math.abs.aspx)|
56
57
|[_ltoa, _ltow](../c-runtime-library/reference/ltoa-ltow.md), [_ltoa_s, _ltow_s](../c-runtime-library/reference/ltoa-s-ltow-s.md)|Convert `long` to string|[System::Convert::ToString](https://msdn.microsoft.com/en-us/library/system.convert.tostring.aspx)|
57
58
|[_mbbtombc, _mbbtombc_l](../c-runtime-library/reference/mbbtombc-mbbtombc-l.md)|Convert 1-byte multibyte character to corresponding 2-byte multibyte character|Not applicable. To call the standard C function, use `PInvoke`. For more information, see [Platform Invoke Examples](http://msdn.microsoft.com/Library/15926806-f0b7-487e-93a6-4e9367ec689f).|
58
59
|[_mbcjistojms, _mbcjistojms_l, _mbcjmstojis, _mbcjmstojis_l](../c-runtime-library/reference/mbcjistojms-mbcjistojms-l-mbcjmstojis-mbcjmstojis-l.md)|Convert Japan Industry Standard (JIS) character to Japan Microsoft (JMS) character|Not applicable. To call the standard C function, use `PInvoke`. For more information, see [Platform Invoke Examples](http://msdn.microsoft.com/Library/15926806-f0b7-487e-93a6-4e9367ec689f).|
Copy file name to clipboardExpand all lines: docs/c-runtime-library/delete-operator-crt.md
+1-47Lines changed: 1 addition & 47 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,50 +45,4 @@ translation.priority.ht:
45
45
- "zh-tw"
46
46
---
47
47
# operator delete(CRT)
48
-
Frees allocated block.
49
-
50
-
## Syntax
51
-
52
-
```
53
-
54
-
void __cdecl operator delete[](void * object);
55
-
void __cdecl operator delete[](void * object,
56
-
void * memory) throw();
57
-
void __cdecl operator delete[](void * object,
58
-
const std::nothrow_t&) throw();
59
-
```
60
-
61
-
#### Parameters
62
-
*memory*
63
-
The memory location being freed.
64
-
65
-
*object*
66
-
A pointer to the object being deleted.
67
-
68
-
## Remarks
69
-
This form of **operator delete** is known as vector delete, in contrast to the scalar delete form ([operator delete](../c-runtime-library/operator-delete-crt.md)).
70
-
71
-
**operator**`delete[]` frees memory allocated by [operator new[]](../c-runtime-library/new-operator-crt.md).
72
-
73
-
The first form of this operator is known as the nonplacement form. The second and third forms of this operator will commonly not be called from code but exist to give the compiler a matching delete to call when a placement new fails.
74
-
75
-
The first form of the operator is defined by the compiler and does not require new.h to be included in your program.
76
-
77
-
With the exception of throwing or no-throwing behavior, the CRT **operator**`delete[]` behaves like [operator delete[]](../Topic/operator%20delete\(%3Cnew%3E\).md) in the Standard C++ Library.
78
-
79
-
## Requirements
80
-
81
-
|Routine|Required header|
82
-
|-------------|---------------------|
83
-
|`delete[]`|\<new.h>|
84
-
85
-
For additional compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction.
86
-
87
-
## Libraries
88
-
All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md).
89
-
90
-
## Example
91
-
See [operator new[]](../c-runtime-library/new-operator-crt.md) for examples of using operator **delete**.
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../../cpp/new-and-delete-operators.md) and [delete operator](../../cpp/delete-operator-cpp.md) in the C++ Language Reference.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/new-operator-crt.md
+1-100Lines changed: 1 addition & 100 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,103 +45,4 @@ translation.priority.ht:
45
45
- "zh-tw"
46
46
---
47
47
# operator new(CRT)
48
-
Allocate block of memory from heap
49
-
50
-
## Syntax
51
-
52
-
```
53
-
54
-
void *__cdecl operator new[](size_t count);
55
-
void *__cdecl operator new[] (
56
-
size_t count,
57
-
void * object
58
-
) throw();
59
-
void *__cdecl operator new[] (
60
-
size_t count,
61
-
const std::nothrow_t&
62
-
) throw();
63
-
```
64
-
65
-
#### Parameters
66
-
*count*
67
-
The size of the allocation.
68
-
69
-
*object*
70
-
A pointer to a block of memory in which the object will be created.
71
-
72
-
## Return Value
73
-
A pointer to the lowest byte address of the newly allocated storage.
74
-
75
-
## Remarks
76
-
This form of `operator new` is known as vector new, in contrast to the scalar new form ([operator new](../c-runtime-library/operator-new-crt.md)).
77
-
78
-
The first form of this operator is known as the nonplacement form. The second form of this operator is known as the placement form and the third form of this operator is the nonthrowing placement form.
79
-
80
-
The first form of the operator is defined by the compiler and does not require new.h to be included in your program.
81
-
82
-
[operator delete[]](../Topic/operator%20delete\(%3Cnew%3E\).md) frees memory allocated with operator new.
83
-
84
-
You can configure whether `operator new[]` returns null or throws an exception on failure. See [The new and delete Operators](../cpp/new-and-delete-operators.md) for more information.
85
-
86
-
With the exception of throwing or no-throwing behavior, the CRT `operator new` behaves like [operator new[]](../Topic/operator%20new\(%3Cnew%3E\).md) in the Standard C++ Library.
87
-
88
-
## Requirements
89
-
90
-
|Routine|Required header|
91
-
|-------------|---------------------|
92
-
|`new[]`|\<new.h>|
93
-
94
-
For additional compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction.
95
-
96
-
## Libraries
97
-
All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md).
98
-
99
-
## Example
100
-
The following shows how to use the vector, nonplacement form of `operator new`.
101
-
102
-
```
103
-
// crt_new4.cpp
104
-
#include <stdio.h>
105
-
int main() {
106
-
int * k = new int[10];
107
-
k[0] = 21;
108
-
printf("%d\n", k[0]);
109
-
delete [] k;
110
-
}
111
-
```
112
-
113
-
The following shows how to use the vector, placement form of `operator new`.
114
-
115
-
```
116
-
// crt_new5.cpp
117
-
#include <stdio.h>
118
-
#include <new.h>
119
-
int main() {
120
-
int * i = new int[10];
121
-
i[0] = 21;
122
-
printf("%d\n", i[0]);
123
-
// initialize existing memory (i) with, in this case, int[[10]
124
-
int * j = new(i) int[10]; // placement vector new
125
-
printf("%d\n", j[0]);
126
-
j[0] = 22;
127
-
printf("%d\n", i[0]);
128
-
delete [] i; // or, could have deleted [] j
129
-
}
130
-
```
131
-
132
-
The following shows how to use the vector, placement, no-throw form of `operator new`.
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../../cpp/new-and-delete-operators.md) and [new operator](../../cpp/new-operator-cpp.md) in the C++ Language Reference.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/operator-delete-crt.md
+1-53Lines changed: 1 addition & 53 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -45,56 +45,4 @@ translation.priority.ht:
45
45
- "zh-tw"
46
46
---
47
47
# operator delete (CRT)
48
-
Frees allocated block.
49
-
50
-
## Syntax
51
-
52
-
```
53
-
54
-
void __cdecl operator delete(
55
-
void * object
56
-
);
57
-
void __cdecl operator delete(
58
-
void * object,
59
-
void * memory
60
-
) throw();
61
-
void __cdecl operator delete(
62
-
void * object,
63
-
const std::nothrow_t&
64
-
) throw();
65
-
```
66
-
67
-
#### Parameters
68
-
*memory*
69
-
The memory location being freed.
70
-
71
-
*object*
72
-
A pointer to the object being deleted.
73
-
74
-
## Remarks
75
-
This form of **operator delete** is known as scalar delete, in contrast to the vector delete form ([operator delete[]](../c-runtime-library/delete-operator-crt.md)).
76
-
77
-
**operator delete** frees memory allocated by [operator new](../c-runtime-library/operator-new-crt.md).
78
-
79
-
The first form of this operator is known as the nonplacement form. The second and third forms of this operator will commonly not be called from code but exist to give the compiler a matching delete to call when a placement new fails.
80
-
81
-
The first form of the operator is defined by the compiler and does not require new.h to be included in your program.
82
-
83
-
With the exception of throwing or no-throwing behavior, the CRT **operator delete** behaves like [operator delete](../Topic/operator%20delete%20\(%3Cnew%3E\).md) in the Standard C++ Library.
84
-
85
-
## Requirements
86
-
87
-
|Routine|Required header|
88
-
|-------------|---------------------|
89
-
|**delete**|\<new.h>|
90
-
91
-
For additional compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction.
92
-
93
-
## Libraries
94
-
All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md).
95
-
96
-
## Example
97
-
See [operator new](../c-runtime-library/operator-new-crt.md) for examples of using operator **delete**.
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../../cpp/new-and-delete-operators.md) and [delete operator](../../cpp/delete-operator-cpp.md) in the C++ Language Reference.
Copy file name to clipboardExpand all lines: docs/c-runtime-library/operator-new-crt.md
+1-102Lines changed: 1 addition & 102 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -43,105 +43,4 @@ translation.priority.ht:
43
43
- "zh-tw"
44
44
---
45
45
# operator new (CRT)
46
-
Allocates block of memory from heap
47
-
48
-
## Syntax
49
-
50
-
```
51
-
52
-
void *__cdecl operator new(
53
-
size_t count
54
-
);
55
-
void *__cdecl operator new(
56
-
size_t count,
57
-
void * object
58
-
) throw();
59
-
void *__cdecl operator new(
60
-
size_t count,
61
-
const std::nothrow_t&
62
-
) throw();
63
-
```
64
-
65
-
#### Parameters
66
-
*count*
67
-
The size of the allocation.
68
-
69
-
*object*
70
-
A pointer to a block of memory in which the object will be created.
71
-
72
-
## Return Value
73
-
A pointer to the lowest byte address of the newly allocated storage.
74
-
75
-
## Remarks
76
-
This form of `operator new` is known as scalar new, in contrast to the vector new form ([operator new[]](../c-runtime-library/new-operator-crt.md)).
77
-
78
-
The first form of this operator is known as the nonplacement form. The second form of this operator is known as the placement form and the third form of this operator is the nonthrowing, placement form.
79
-
80
-
The first form of the operator is defined by the compiler and does not require new.h to be included in your program.
81
-
82
-
[operator delete](../c-runtime-library/operator-delete-crt.md) frees memory allocated with `operator new`.
83
-
84
-
You can configure whether operator new returns null or throws an exception on failure. See [The new and delete Operators](../cpp/new-and-delete-operators.md) for more information.
85
-
86
-
With the exception of throwing or no-throwing behavior, the CRT `operator new` behaves like [operator new](../Topic/operator%20new%20\(%3Cnew%3E\).md) in the Standard C++ Library.
87
-
88
-
## Requirements
89
-
90
-
|Routine|Required header|
91
-
|-------------|---------------------|
92
-
|**new**|\<new.h>|
93
-
94
-
For additional compatibility information, see [Compatibility](../c-runtime-library/compatibility.md) in the Introduction.
95
-
96
-
## Libraries
97
-
All versions of the [C run-time libraries](../c-runtime-library/crt-library-features.md).
98
-
99
-
## Example
100
-
The following shows how to use the scalar, nonplacement form of `operator new`.
101
-
102
-
```
103
-
// crt_new1.cpp
104
-
#include <stdio.h>
105
-
int main() {
106
-
int * i = new int(6);
107
-
printf("%d\n", *i);
108
-
delete i;
109
-
}
110
-
```
111
-
112
-
The following shows how to use the scalar, placement form of `operator new`.
113
-
114
-
```
115
-
// crt_new2.cpp
116
-
#include <stdio.h>
117
-
#include <new.h>
118
-
int main() {
119
-
int * i = new int(12);
120
-
printf("*i = %d\n", *i);
121
-
// initialize existing memory (i) with, in this case, int(7)
122
-
int * j = new(i) int(7); // placement new
123
-
printf("*j = %d\n", *j);
124
-
printf("*i = %d\n", *i);
125
-
delete i; // or, could have deleted j
126
-
}
127
-
```
128
-
129
-
The following shows how to use the scalar, placement, no-throw form of `operator new`.
130
-
131
-
```
132
-
// crt_new3.cpp
133
-
#include <stdio.h>
134
-
#include <new.h>
135
-
int main() {
136
-
// allocates memory, initialize (8) and if call fails, new returns null
137
-
int * k = new(std::nothrow) int(8); // placement new
138
-
printf("%d\n", *k);
139
-
delete k;
140
-
}
141
-
```
142
-
143
-
## .NET Framework Equivalent
144
-
Not applicable. To call the standard C function, use `PInvoke`. For more information, see [Platform Invoke Examples](http://msdn.microsoft.com/Library/15926806-f0b7-487e-93a6-4e9367ec689f).
Beginning in Visual Studio 2013, the Universal C Runtime (UCRT) no longer supports the C++-specific operator new and operator delete functions. These are now part of the C++ Standard Library. For more information, see [new and delete operators](../../cpp/new-and-delete-operators.md) and [new operator](../../cpp/new-operator-cpp.md) in the C++ Language Reference.
0 commit comments