From 0b29e5c4fc44eb7f1105ec0c7dfb6fd3c2d4bda3 Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Mon, 24 Aug 2020 16:45:46 -0700 Subject: [PATCH 1/7] Adding example to C26447 Updated the page with the example from the C++ Core Guidelines. --- docs/code-quality/c26447.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/docs/code-quality/c26447.md b/docs/code-quality/c26447.md index 75488ea4b4e..ca4c2acf91a 100644 --- a/docs/code-quality/c26447.md +++ b/docs/code-quality/c26447.md @@ -18,3 +18,19 @@ This rule amends another rule, [C26440 DECLARE_NOEXCEPT](c26440.md), which tries - The rule focuses only on function calls. It flags targets that are not **`constexpr`** and that can potentially throw exceptions; in other words they are not marked explicitly as non-throwing by using **`noexcept`**, **`__declspec(nothrow)`**, **throw()**. - The compiler-generated target functions are skipped to reduce noise since exception specifications are not always provided by the compiler. - The checker also skips special kinds of target functions that are expected to be implemented as **`noexcept`**; this rule is enforced by [C26439 SPECIAL_NOEXCEPT](c26439.md). + +# Example +```cpp +#include +#include +#include + +std::vector collect(std::istream& is) noexcept +{ + std::vector res; + for (std::string s; is >> s;) // C26447, `operator bool()` can throw, std::string's allocator can throw + res.push_back(s); // C26447, `push_back` can throw + return res; +} +``` +You can fix these warnings by removing noexcept from the function signature. From 29b461ff5a648361aac785d2819f673a2161d16e Mon Sep 17 00:00:00 2001 From: "Jordan Maples [MSFT]" <49793787+JordanMaples@users.noreply.github.com> Date: Tue, 25 Aug 2020 10:28:40 -0700 Subject: [PATCH 2/7] Update c26447.md --- docs/code-quality/c26447.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/code-quality/c26447.md b/docs/code-quality/c26447.md index ca4c2acf91a..28029ef7805 100644 --- a/docs/code-quality/c26447.md +++ b/docs/code-quality/c26447.md @@ -19,7 +19,7 @@ This rule amends another rule, [C26440 DECLARE_NOEXCEPT](c26440.md), which tries - The compiler-generated target functions are skipped to reduce noise since exception specifications are not always provided by the compiler. - The checker also skips special kinds of target functions that are expected to be implemented as **`noexcept`**; this rule is enforced by [C26439 SPECIAL_NOEXCEPT](c26439.md). -# Example +## Example ```cpp #include #include From 3abed1670848bc8fb1f2e3dbf5236fde9d855165 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Wed, 26 Aug 2020 16:15:48 -0700 Subject: [PATCH 3/7] github issue 2149 --- docs/mfc/reference/cobarray-class.md | 296 +++++++++++++-------------- 1 file changed, 148 insertions(+), 148 deletions(-) diff --git a/docs/mfc/reference/cobarray-class.md b/docs/mfc/reference/cobarray-class.md index 72ede19c5c3..03622a26b08 100644 --- a/docs/mfc/reference/cobarray-class.md +++ b/docs/mfc/reference/cobarray-class.md @@ -1,6 +1,6 @@ --- title: "CObArray Class" -ms.date: "11/04/2016" +ms.date: "08/26/2020" f1_keywords: ["CObArray", "AFXCOLL/CObArray", "AFXCOLL/CObArray::CObArray", "AFXCOLL/CObArray::Add", "AFXCOLL/CObArray::Append", "AFXCOLL/CObArray::Copy", "AFXCOLL/CObArray::ElementAt", "AFXCOLL/CObArray::FreeExtra", "AFXCOLL/CObArray::GetAt", "AFXCOLL/CObArray::GetCount", "AFXCOLL/CObArray::GetData", "AFXCOLL/CObArray::GetSize", "AFXCOLL/CObArray::GetUpperBound", "AFXCOLL/CObArray::InsertAt", "AFXCOLL/CObArray::IsEmpty", "AFXCOLL/CObArray::RemoveAll", "AFXCOLL/CObArray::RemoveAt", "AFXCOLL/CObArray::SetAt", "AFXCOLL/CObArray::SetAtGrow", "AFXCOLL/CObArray::SetSize"] helpviewer_keywords: ["CObArray [MFC], CObArray", "CObArray [MFC], Add", "CObArray [MFC], Append", "CObArray [MFC], Copy", "CObArray [MFC], ElementAt", "CObArray [MFC], FreeExtra", "CObArray [MFC], GetAt", "CObArray [MFC], GetCount", "CObArray [MFC], GetData", "CObArray [MFC], GetSize", "CObArray [MFC], GetUpperBound", "CObArray [MFC], InsertAt", "CObArray [MFC], IsEmpty", "CObArray [MFC], RemoveAll", "CObArray [MFC], RemoveAt", "CObArray [MFC], SetAt", "CObArray [MFC], SetAtGrow", "CObArray [MFC], SetSize"] ms.assetid: 27894efd-2370-4776-9ed9-24a98492af17 @@ -11,7 +11,7 @@ Supports arrays of `CObject` pointers. ## Syntax -``` +```cpp class CObArray : public CObject ``` @@ -34,7 +34,7 @@ class CObArray : public CObject |[CObArray::FreeExtra](#freeextra)|Frees all unused memory above the current upper bound.| |[CObArray::GetAt](#getat)|Returns the value at a given index.| |[CObArray::GetCount](#getcount)|Gets the number of elements in this array.| -|[CObArray::GetData](#getdata)|Allows access to elements in the array. Can be NULL.| +|[CObArray::GetData](#getdata)|Allows access to elements in the array. Can be `NULL`.| |[CObArray::GetSize](#getsize)|Gets the number of elements in this array.| |[CObArray::GetUpperBound](#getupperbound)|Returns the largest valid index.| |[CObArray::InsertAt](#insertat)|Inserts an element (or all the elements in another array) at a specified index.| @@ -55,7 +55,7 @@ class CObArray : public CObject These object arrays are similar to C arrays, but they can dynamically shrink and grow as necessary. -Array indexes always start at position 0. You can decide whether to fix the upper bound or allow the array to expand when you add elements past the current bound. Memory is allocated contiguously to the upper bound, even if some elements are null. +Array indexes always start at position 0. You can decide whether to fix the upper bound or allow the array to expand when you add elements past the current bound. Memory is allocated contiguously to the upper bound, even if some elements are `NULL`. Under Win32, the size of a `CObArray` object is limited only to available memory. @@ -89,13 +89,13 @@ Array class derivation is similar to list derivation. For details on the derivat Adds a new element to the end of an array, growing the array by 1. -``` +```cpp INT_PTR Add(CObject* newElement); ``` ### Parameters -*newElement*
+*newElement*\ The `CObject` pointer to be added to this array. ### Return Value @@ -110,12 +110,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**INT_PTR Add( BYTE** `newElement` **);**

**throw( CMemoryException\* );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**INT_PTR Add( DWORD** `newElement` **);**

**throw( CMemoryException\* );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**INT_PTR Add( void** \* `newElement` **);**

**throw( CMemoryException\* );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**INT_PTR Add( LPCTSTR** `newElement` **); throw( CMemoryException\* );**

**INT_PTR Add(const CString&** `newElement` **);**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**INT_PTR Add( UINT** `newElement` **);**

**throw( CMemoryException\* );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**INT_PTR Add( WORD** `newElement` **);**

**throw( CMemoryException\* );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR Add(BYTE newElement);`

`throw(CMemoryException *);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR Add(DWORD newElement);`

`throw(CMemoryException *);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR Add(void * newElement);`

`throw(CMemoryException*);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR Add(LPCTSTR newElement);`

`throw(CMemoryException *);`

`INT_PTR Add(const CString& newElement);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR Add(UINT newElement);`

`throw(CMemoryException *);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR Add(WORD newElement);`

`throw(CMemoryException *);`| ### Example @@ -135,13 +135,13 @@ Add example: A CObArray with 2 elements Call this member function to add the contents of another array to the end of the given array. -``` +```cpp INT_PTR Append(const CObArray& src); ``` ### Parameters -*src*
+*src*\ Source of the elements to be appended to the array. ### Return Value @@ -158,12 +158,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**INT_PTR Append( const CByteArray&** *src* **);**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**INT_PTR Append( const CDWordArray&** *src* **);**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**INT_PTR Append( const CPtrArray&** *src* **);**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**INT_PTR Append( const CStringArray&** *src* **);**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**INT_PTR Append( const CUIntArray&** *src* **);**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**INT_PTR Append( const CWordArray&** *src* **);**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR Append(const CByteArray& src);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR Append(const CDWordArray& src);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR Append(const CPtrArray& src);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR Append(const CStringArray& src);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR Append(const CUIntArray& src);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR Append(const CWordArray& src);`| ### Example @@ -181,7 +181,7 @@ void Copy(const CObArray& src); ### Parameters -*src*
+*src*\ Source of the elements to be copied to the array. ### Remarks @@ -192,12 +192,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void Copy( const CByteArray&** *src* **);**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void Copy( const CDWordArray&** *src* **);**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void Copy( const CPtrArray&** *src* **);**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void Copy( const CStringArray&** *src* **);**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void Copy( const CUIntArray&** *src* **);**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void Copy( const CWordArray&** *src* **);**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void Copy(const CByteArray& src);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void Copy(const CDWordArray& src);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void Copy(const CPtrArray& src);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void Copy(const CStringArray& src);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void Copy(const CUIntArray& src);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void Copy(const CWordArray& src);`| ### Example @@ -209,7 +209,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi Constructs an empty `CObject` pointer array. -``` +```cpp CObArray(); ``` @@ -221,12 +221,12 @@ The following table shows other constructors that are similar to `CObArray::CObA |Class|Constructor| |-----------|-----------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**CByteArray( );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**CDWordArray( );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**CPtrArray( );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**CStringArray( );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**CUIntArray( );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**CWordArray( );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`CByteArray( );`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`CDWordArray( );`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`CPtrArray( );`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CStringArray( );`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`CUIntArray( );`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`CWordArray( );`| ### Example @@ -236,13 +236,13 @@ The following table shows other constructors that are similar to `CObArray::CObA Returns a temporary reference to the element pointer within the array. -``` +```cpp CObject*& ElementAt(INT_PTR nIndex); ``` ### Parameters -*nIndex*
+*nIndex*\ An integer index that is greater than or equal to 0 and less than or equal to the value returned by `GetUpperBound`. ### Return Value @@ -257,16 +257,16 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**BYTE& ElementAt( INT_PTR** `nIndex` **);**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**DWORD& ElementAt( INT_PTR** `nIndex` **);**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void\*& ElementAt( INT_PTR** `nIndex` **);**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**CString& ElementAt( INT_PTR** `nIndex` **);**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**UINT& ElementAt( INT_PTR** `nIndex` **);**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**WORD& ElementAt( INT_PTR** `nIndex` **);**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)`BYTE& ElementAt(INT_PTR nIndex);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DOORN& ElementAt(INT_PTR nIndex);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\*& ElementAt(INT_PTR nIndex);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString& ElementAt(INT_PTR nIndex);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT& ElementAt(INT_PTR nIndex);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD& ElementAt(INT_PTR nIndex);`| ### Example - See the example for [CObArray::GetSize](#getsize). +See the example for [CObArray::GetSize](#getsize). ## CObArray::FreeExtra @@ -284,12 +284,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void FreeExtra( );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void FreeExtra( );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void FreeExtra( );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void FreeExtra( );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void FreeExtra( );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void FreeExtra( );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void FreeExtra( );`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void FreeExtra( );`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void FreeExtra( );`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void FreeExtra( );`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void FreeExtra( );`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void FreeExtra( );`| ### Example @@ -299,13 +299,13 @@ The following table shows other member functions that are similar to `CObArray:: Returns the array element at the specified index. -``` +```cpp CObject* GetAt(INT_PTR nIndex) const; ``` ### Parameters -*nIndex*
+*nIndex*\ An integer index that is greater than or equal to 0 and less than or equal to the value returned by `GetUpperBound`. ### Return Value @@ -321,12 +321,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**BYTE GetAt( INT_PTR** `nIndex` **) const;**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**DWORD GetAt( INT_PTR** `nIndex` **) const;**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void\* GetAt( INT_PTR** `nIndex` **) const;**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**CString GetAt( INT_PTR** `nIndex` **) const;**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**UINT GetAt( INT_PTR** `nIndex` **) const;**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**WORD GetAt( INT_PTR** `nIndex` **) const;**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE GetAt( INT_PTR nIndex) const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD GetAt( INT_PTR nIndex) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\* GetAt( INT_PTR nIndex) const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString GetAt( INT_PTR nIndex) const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT GetAt( INT_PTR nIndex) const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD GetAt( INT_PTR nIndex) const;`| ### Example @@ -338,7 +338,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi Returns the number of array elements. -``` +```cpp INT_PTR GetCount() const; ``` @@ -354,12 +354,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**INT_PTR GetCount( ) const;**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**INT_PTR GetCount( ) const;**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**INT_PTR GetCount( ) const;**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**INT_PTR GetCount( ) const;**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**INT_PTR GetCount( ) const;**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**INT_PTR GetCount( ) const;**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetCount( ) const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetCount( ) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetCount( ) const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetCount( ) const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetCount( ) const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetCount( ) const;`| ### Example @@ -371,7 +371,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi Use this member function to gain direct access to the elements in the array. -``` +```cpp const CObject** GetData() const; CObject** GetData(); @@ -383,7 +383,7 @@ A pointer to the array of `CObject` pointers. ### Remarks -If no elements are available, `GetData` returns a null value. +If no elements are available, `GetData` returns a `NULL` value. While direct access to the elements of an array can help you work more quickly, use caution when calling `GetData`; any errors you make directly affect the elements of your array. @@ -391,12 +391,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**const BYTE\* GetData( ) const;BYTE\* GetData( );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**const DWORD\* GetData( ) const;DWORD\* GetData( );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**const void\*\* GetData( ) const;void\*\* GetData( );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**const CString\* GetData( ) const;CString\* GetData( );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**const UINT\* GetData( ) const;UINT\* GetData( );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**const WORD\* GetData( ) const;WORD\* GetData( );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`const BYTE* GetData() const; BYTE* GetData();`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`const DWORD* GetData() const; DWORD* GetData();`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`const void** GetData() const; void** GetData();`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`const CString* GetData() const; CString* GetData();`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`const UINT* GetData() const; UINT* GetData();`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`const WORD* GetData() const; WORD* GetData();`| ### Example @@ -408,7 +408,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi Returns the size of the array. -``` +```cpp INT_PTR GetSize() const; ``` @@ -420,12 +420,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**INT_PTR GetSize( ) const;**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**INT_PTR GetSize( ) const;**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**INT_PTR GetSize( ) const;**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**INT_PTR GetSize( ) const;**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**INT_PTR GetSize( ) const;**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**INT_PTR GetSize( ) const;**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetSize() const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetSize() const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetSize() const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetSize() const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetSize() const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetSize() const;`| ### Example @@ -437,7 +437,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi Returns the current upper bound of this array. -``` +```cpp INT_PTR GetUpperBound() const; ``` @@ -449,18 +449,18 @@ The index of the upper bound (zero-based). Because array indexes are zero-based, this function returns a value 1 less than `GetSize`. -The condition `GetUpperBound( )` = -1 indicates that the array contains no elements. +The condition `GetUpperBound() = -1` indicates that the array contains no elements. The following table shows other member functions that are similar to `CObArray::GetUpperBound`. |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**INT_PTR GetUpperBound( ) const;**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**INT_PTR GetUpperBound( ) const;**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**INT_PTR GetUpperBound( ) const;**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**INT_PTR GetUpperBound( ) const;**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**INT_PTR GetUpperBound( ) const;**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**INT_PTR GetUpperBound( ) const;**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetUpperBound( ) const;`| ### Example @@ -485,19 +485,19 @@ void InsertAt( ### Parameters -*nIndex*
+*nIndex*\ An integer index that may be greater than the value returned by `GetUpperBound`. -*newElement*
-The `CObject` pointer to be placed in this array. A *newElement* of value NULL is allowed. +*newElement*\ +The `CObject` pointer to be placed in this array. A *newElement* of value `NULL` is allowed. -*nCount*
+*nCount*\ The number of times this element should be inserted (defaults to 1). -*nStartIndex*
+*nStartIndex*\ An integer index that may be greater than the value returned by `GetUpperBound`. -*pNewArray*
+*pNewArray*\ Another array that contains elements to be added to this array. ### Remarks @@ -512,12 +512,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, BYTE** `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CByteArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, DWORD** `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CDWordArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, void** \* `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CPtrArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, LPCTSTR** `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CStringArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, UINT** `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CUIntArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void InsertAt( INT_PTR** `nIndex` **, WORD** `newElement` **, int** `nCount` **= 1 );**

**throw( CMemoryException\* );**

**void InsertAt( INT_PTR** `nStartIndex` **, CWordArray** \* `pNewArray` **);**

**throw( CMemoryException\* );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void InsertAt(INT_PTR nIndex, BYTE newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CByteArray * pNewArray);`

`throw(CMemoryException *);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void InsertAt(INT_PTR nIndex, DWORD newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CDWordArray * pNewArray);`

`throw(CMemoryException *);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void InsertAt(INT_PTR nIndex, void * newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CPtrArray * pNewArray);`

`throw(CMemoryException *);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void InsertAt(INT_PTR nIndex, LPCTSTR newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CStringArray * pNewArray);`

`throw(CMemoryException *);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void InsertAt(INT_PTR nIndex, UINT newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CUIntArray * pNewArray);`

`throw(CMemoryException *);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void InsertAt(INT_PTR nIndex, WORD newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CWordArray * pNewArray);`

`throw(CMemoryException *);`| ### Example @@ -538,7 +538,7 @@ InsertAt example: A CObArray with 3 elements Determines if the array is empty. -``` +```cpp BOOL IsEmpty() const; ``` @@ -550,7 +550,7 @@ Nonzero if the array is empty; otherwise 0. These subscript operators are a convenient substitute for the `SetAt` and `GetAt` functions. -``` +```cpp CObject*& operator[](int_ptr nindex); CObject* operator[](int_ptr nindex) const; ``` @@ -565,12 +565,12 @@ The following table shows other operators that are similar to `CObArray::operato |Class|Operator| |-----------|--------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**BYTE& operator [](int_ptr** `nindex` **\);**

**BYTE operator [](int_ptr** `nindex` **\) const;**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**DWORD& operator [](int_ptr** `nindex` **\);**

**DWORD operator [](int_ptr** `nindex` **\) const;**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void\*& operator [](int_ptr** `nindex` **\);**

**void\* operator [](int_ptr** `nindex` **\) const;**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**CString& operator [](int_ptr** `nindex` **\);**

**CString operator [](int_ptr** `nindex` **\) const;**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**UINT& operator [](int_ptr** `nindex` **\);**

**UINT operator [](int_ptr** `nindex` **\) const;**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**WORD& operator [](int_ptr** `nindex` **\);**

**WORD operator [](int_ptr** `nindex` **\) const;**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE& operator [](INT_PTR nindex);`

`BYTE operator [](INT_PTR nindex) const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD& operator [](INT_PTR nindex);`

`DWORD operator [](INT_PTR nindex) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\*& operator [](INT_PTR nindex);`

`void* operator [](INT_PTR nindex) const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString& operator [](INT_PTR nindex);`

`CString operator [](INT_PTR nindex) const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT& operator [](INT_PTR nindex);`

`UINT operator [](INT_PTR nindex) const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD& operator [](INT_PTR nindex);`

`WORD operator [](INT_PTR nindex) const;`| ### Example @@ -596,12 +596,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void RemoveAll( );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void RemoveAll( );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void RemoveAll( );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void RemoveAll( );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void RemoveAll( );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void RemoveAll( );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void RemoveAll();`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void RemoveAll();`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void RemoveAll();`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void RemoveAll();`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void RemoveAll();`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void RemoveAll();`| ### Example @@ -621,10 +621,10 @@ void RemoveAt( ### Parameters -*nIndex*
+*nIndex*\ An integer index that is greater than or equal to 0 and less than or equal to the value returned by `GetUpperBound`. -*nCount*
+*nCount*\ The number of elements to remove. ### Remarks @@ -639,12 +639,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** `nCount` **= 1 );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** `nCount` **= 1 );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** `nCount` **= 1 );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** `nCount` **= 1 );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** `nCount` **= 1 );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void RemoveAt( INT_PTR** `nIndex` **, INT_PTR** *nCount* **= 1 );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void RemoveAt(INT_PTR nIndex, INT_PTR nCount = 1);`| ### Example @@ -671,11 +671,11 @@ void SetAt( ### Parameters -*nIndex*
+*nIndex*\ An integer index that is greater than or equal to 0 and less than or equal to the value returned by `GetUpperBound`. -*newElement*
-The object pointer to be inserted in this array. A NULL value is allowed. +*newElement*\ +The object pointer to be inserted in this array. A `NULL` value is allowed. ### Remarks @@ -687,12 +687,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void SetAt( INT_PTR** `nIndex` **, BYTE** `newElement` **);**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void SetAt( INT_PTR** `nIndex` **, DWORD** `newElement` **);**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void SetAt( INT_PTR** `nIndex` **, void** \* `newElement` **);**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void SetAt( INT_PTR** `nIndex` **, LPCTSTR** `newElement` **);**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void SetAt( INT_PTR** `nIndex` **, UINT** `newElement` **);**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void SetAt( INT_PTR** `nIndex` **, WORD** `newElement` **);**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetAt(INT_PTR nIndex, BYTE newElement);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetAt(INT_PTR nIndex, DWORD newElement);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetAt(INT_PTR nIndex, void* newElement);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetAt(INT_PTR nIndex, LPCTSTR newElement);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetAt(INT_PTR nIndex, UINT newElement);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetAt(INT_PTR nIndex, WORD newElement);`| ### Example @@ -720,11 +720,11 @@ void SetAtGrow( ### Parameters -*nIndex*
+*nIndex*\ An integer index that is greater than or equal to 0. -*newElement*
-The object pointer to be added to this array. A NULL value is allowed. +*newElement*\ +The object pointer to be added to this array. A `NULL` value is allowed. ### Remarks @@ -769,10 +769,10 @@ void SetSize( ### Parameters -*nNewSize*
+*nNewSize*\ The new array size (number of elements). Must be greater than or equal to 0. -*nGrowBy*
+*nGrowBy*\ The minimum number of element slots to allocate if a size increase is necessary. ### Remarks @@ -781,18 +781,18 @@ If the new size is smaller than the old size, then the array is truncated and al The *nGrowBy* parameter affects internal memory allocation while the array is growing. Its use never affects the array size as reported by `GetSize` and `GetUpperBound`. -If the size of the array has grown, all newly allocated **CObject** \* pointers are set to NULL. +If the size of the array has grown, all newly allocated **CObject** \* pointers are set to `NULL`. The following table shows other member functions that are similar to `CObArray::SetSize`. |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void SetSize( INT_PTR** `nNewSize` **, int** `nGrowBy` **= -1 );**

**throw( CMemoryException\* );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| ### Example @@ -800,10 +800,10 @@ The following table shows other member functions that are similar to `CObArray:: ## See also -[CObject Class](../../mfc/reference/cobject-class.md)
-[Hierarchy Chart](../../mfc/hierarchy-chart.md)
-[CStringArray Class](../../mfc/reference/cstringarray-class.md)
-[CPtrArray Class](../../mfc/reference/cptrarray-class.md)
-[CByteArray Class](../../mfc/reference/cbytearray-class.md)
-[CWordArray Class](../../mfc/reference/cwordarray-class.md)
+[CObject Class](../../mfc/reference/cobject-class.md)\ +[Hierarchy Chart](../../mfc/hierarchy-chart.md)\ +[CStringArray Class](../../mfc/reference/cstringarray-class.md)\ +[CPtrArray Class](../../mfc/reference/cptrarray-class.md)\ +[CByteArray Class](../../mfc/reference/cbytearray-class.md)\ +[CWordArray Class](../../mfc/reference/cwordarray-class.md)\ [CDWordArray Class](../../mfc/reference/cdwordarray-class.md) From 2d84c6eefaf9688378f011ace25befff1bf34e45 Mon Sep 17 00:00:00 2001 From: Colin Robertson Date: Wed, 26 Aug 2020 17:53:21 -0700 Subject: [PATCH 4/7] Update c26447.md Add description metadata, style fixes, Acrolinx. --- docs/code-quality/c26447.md | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/docs/code-quality/c26447.md b/docs/code-quality/c26447.md index 28029ef7805..3f2c48d9b39 100644 --- a/docs/code-quality/c26447.md +++ b/docs/code-quality/c26447.md @@ -1,25 +1,29 @@ --- title: C26447 -ms.date: 03/22/2018 +description: "Microsoft C++ Code Analysis warning C26447 for the C++ Core Guidelines case F.6." +ms.date: 08/25/2020 ms.topic: reference f1_keywords: ["C26447"] helpviewer_keywords: ["C26447"] --- # C26447 DONT_THROW_IN_NOEXCEPT -The function is declared **`noexcept`** but calls a function that may throw exceptions. +> The function is declared `noexcept` but calls function *function_name* that may throw exceptions (f.6). -C++ Core Guidelines: +C++ Core Guidelines:\ [F.6: If your function may not throw, declare it noexcept](https://github.com/isocpp/CppCoreGuidelines/blob/master/CppCoreGuidelines.md#f6-if-your-function-may-not-throw-declare-it-noexcept). -This rule amends another rule, [C26440 DECLARE_NOEXCEPT](c26440.md), which tries to find functions that are good candidates to be marked as **`noexcept`**. In this case, the idea is that once some function is marked as **`noexcept`**, it must keep its contract by not invoking other code that may throw exceptions. +## Remarks + +This rule amends another rule, [C26440 DECLARE_NOEXCEPT](c26440.md), which tries to find functions that are good candidates to mark as **`noexcept`**. In this case, the idea is that once you mark some function as **`noexcept`**, it must keep its contract by not invoking other code that may throw exceptions. - The Microsoft C++ compiler already handles straightforward violations like **`throw`** statements in the function body (see [C4297](/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4297)). -- The rule focuses only on function calls. It flags targets that are not **`constexpr`** and that can potentially throw exceptions; in other words they are not marked explicitly as non-throwing by using **`noexcept`**, **`__declspec(nothrow)`**, **throw()**. +- The rule focuses only on function calls. It flags targets that aren't **`constexpr`** and that can potentially throw exceptions. In other words, they aren't marked explicitly as non-throwing by using **`noexcept`**, **`__declspec(nothrow)`**, or **throw()**. - The compiler-generated target functions are skipped to reduce noise since exception specifications are not always provided by the compiler. -- The checker also skips special kinds of target functions that are expected to be implemented as **`noexcept`**; this rule is enforced by [C26439 SPECIAL_NOEXCEPT](c26439.md). +- The checker also skips special kinds of target functions we expect you to implement as **`noexcept`**; this rule is enforced by [C26439 SPECIAL_NOEXCEPT](c26439.md). ## Example + ```cpp #include #include @@ -33,4 +37,9 @@ std::vector collect(std::istream& is) noexcept return res; } ``` -You can fix these warnings by removing noexcept from the function signature. + +You can fix these warnings by removing **`noexcept`** from the function signature. + +## See also + +[C26440 DECLARE_NOEXCEPT](c26440.md) From 4c27e5135e74163aeeaa0af7b3180ca638044a95 Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Thu, 27 Aug 2020 11:24:00 -0700 Subject: [PATCH 5/7] fixes for github issue# 2148,2292,2294,1696,1641, and 2171 --- .../reference/coledatetime-class.md | 5 +- ...printf-snprintf-l-snwprintf-snwprintf-l.md | 5 +- .../strtod-strtod-l-wcstod-wcstod-l.md | 22 ++- docs/mfc/reference/ccombobox-class.md | 4 +- docs/mfc/reference/cobarray-class.md | 137 +++++++++--------- 5 files changed, 97 insertions(+), 76 deletions(-) diff --git a/docs/atl-mfc-shared/reference/coledatetime-class.md b/docs/atl-mfc-shared/reference/coledatetime-class.md index d2718a2ac12..532811903af 100644 --- a/docs/atl-mfc-shared/reference/coledatetime-class.md +++ b/docs/atl-mfc-shared/reference/coledatetime-class.md @@ -1,6 +1,7 @@ --- title: "COleDateTime Class" -ms.date: "03/27/2019" +description: "API reference for the MFC COleDateTime class which Encapsulates the `DATE` data type used in OLE automation." +ms.date: "08/27/2020" f1_keywords: ["COleDateTime", "ATLCOMTIME/ATL::COleDateTime", "ATLCOMTIME/ATL::COleDateTime::COleDateTime", "ATLCOMTIME/ATL::COleDateTime::Format", "ATLCOMTIME/ATL::COleDateTime::GetAsDBTIMESTAMP", "ATLCOMTIME/ATL::COleDateTime::GetAsSystemTime", "ATLCOMTIME/ATL::COleDateTime::GetAsUDATE", "ATLCOMTIME/ATL::COleDateTime::GetCurrentTime", "ATLCOMTIME/ATL::COleDateTime::GetDay", "ATLCOMTIME/ATL::COleDateTime::GetDayOfWeek", "ATLCOMTIME/ATL::COleDateTime::GetDayOfYear", "ATLCOMTIME/ATL::COleDateTime::GetHour", "ATLCOMTIME/ATL::COleDateTime::GetMinute", "ATLCOMTIME/ATL::COleDateTime::GetMonth", "ATLCOMTIME/ATL::COleDateTime::GetSecond", "ATLCOMTIME/ATL::COleDateTime::GetStatus", "ATLCOMTIME/ATL::COleDateTime::GetYear", "ATLCOMTIME/ATL::COleDateTime::ParseDateTime", "ATLCOMTIME/ATL::COleDateTime::SetDate", "ATLCOMTIME/ATL::COleDateTime::SetDateTime", "ATLCOMTIME/ATL::COleDateTime::SetStatus", "ATLCOMTIME/ATL::COleDateTime::SetTime", "ATLCOMTIME/ATL::COleDateTime::m_dt", "ATLCOMTIME/ATL::COleDateTime::m_status"] helpviewer_keywords: ["shared classes, COleDateTime", "time-only values", "Date data type, MFC encapsulation of", "COleDateTime class", "dates, handling in MFC", "time, handling in MFC"] ms.assetid: e718f294-16ec-4649-88b6-a4dbae5178fb @@ -419,7 +420,7 @@ For information on other member functions that query the value of this `COleDate ## COleDateTime::GetDayOfWeek -Gets the day of the month represented by this date/time value. +Gets the day of the week represented by this date/time value. ``` int GetDayOfWeek() const throw(); diff --git a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md index 83409540490..ac639935a93 100644 --- a/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md +++ b/docs/c-runtime-library/reference/snprintf-snprintf-snprintf-l-snwprintf-snwprintf-l.md @@ -1,6 +1,7 @@ --- title: "snprintf, _snprintf, _snprintf_l, _snwprintf, _snwprintf_l" -ms.date: "11/04/2016" +description: "API reference for snprintf, _snprintf, _snprintf_l, _snwprintf, _snwprintf_, which write formatted data to a string." +ms.date: "08/27/2020" api_name: ["_snwprintf", "_snprintf", "_snprintf_l", "_snwprintf_l", "snprintf"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "ntoskrnl.exe"] api_type: ["DLLExport"] @@ -101,7 +102,7 @@ For more information, see [Format Specification Syntax: printf and wprintf Funct ## Return Value -Let **len** be the length of the formatted data string, not including the terminating null. Both **len** and *count* are in bytes for **snprintf** and **_snprintf**, wide characters for **_snwprintf**. +Let **len** be the length of the formatted data string, not including the terminating null. Both **len** and **count** are the number of characters for **snprintf** and **_snprintf**, and the number of wide characters for **_snwprintf**. For all functions, if **len** < *count*, **len** characters are stored in *buffer*, a null-terminator is appended, and **len** is returned. diff --git a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md index 8c6f4506e5f..3ca3e6ef13a 100644 --- a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md +++ b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md @@ -1,6 +1,7 @@ --- title: "strtod, _strtod_l, wcstod, _wcstod_l" -ms.date: "4/2/2020" +description: ""API reference for strtod, _strtod_l, wcstod, _wcstod_l, which convert strings to a double-precision value." +ms.date: "08/27/2020" api_name: ["wcstod", "_wcstod_l", "_strtod_l", "strtod", "_o__strtod_l", "_o__wcstod_l", "_o_strtod", "_o_wcstod"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"] api_type: ["DLLExport"] @@ -78,11 +79,26 @@ If *endptr* isn't **NULL**, a pointer to the character that stopped the scan is **strtod** expects *strSource* to point to a string of one of the following forms: [*whitespace*] [*sign*] {*digits* [*radix* *digits*] | *radix* *digits*} [{**e** | **E**} [*sign*] *digits*] -[*whitespace*] [*sign*] {**0x** | **0X**} {*hexdigits* [*radix* *hexdigits*] | *radix* *hexdigits*} [{**p** | **P**} [*sign*] *hexdigits*] +[*whitespace*] [*sign*] {**0x** | **0X**} {*hexdigits* [*radix* *hexdigits*] | *radix* *hexdigits*} [{**p** | **P**} [*sign*] *digits*] [*whitespace*] [*sign*] {**INF** | **INFINITY**} [*whitespace*] [*sign*] **NAN** [*sequence*] -The optional leading *whitespace* may consist of space and tab characters, which are ignored; *sign* is either plus (+) or minus (-); *digits* are one or more decimal digits; *hexdigits* are one or more hexadecimal digits; *radix* is the radix point character, either a period (.) in the default "C" locale, or the locale-specific value if the current locale is different or when *locale* is specified; a *sequence* is a sequence of alphanumeric or underscore characters. In both decimal and hexadecimal number forms, if no digits appear before the radix point character, at least one must appear after the radix point character. In the decimal form, the decimal digits can be followed by an exponent, which consists of an introductory letter (**e** or **E**) and an optionally signed integer. In the hexadecimal form, the hexadecimal digits can be followed by an exponent, which consists of an introductory letter (**p** or **P**) and an optionally signed hexadecimal integer that represents the exponent as a power of 2. In either form, if there isn't an exponent part or a radix point character, a radix point character is assumed to follow the last digit in the string. Case is ignored in both the **INF** and **NAN** forms. The first character that doesn't fit one of these forms stops the scan. +The optional leading *whitespace* may consist of space and tab characters, which are ignored.\ +*sign* is either plus (+) or minus (-).\ +*digits* are one or more decimal digits.\ +*hexdigits* are one or more hexadecimal digits.\ +*radix* is the radix point character, either a period (.) in the default "C" locale, or the locale-specific value if the current locale is different or when *locale* is specified.\ + A *sequence* is a sequence of alphanumeric or underscore characters. + +In both decimal and hexadecimal number forms, if no digits appear before the radix point character, at least one must appear after the radix point character. + +In the decimal form, the decimal digits can be followed by an exponent, which consists of an introductory letter (**e** or **E**) and an optionally signed integer. + +In the hexadecimal form, the hexadecimal digits can be followed by an exponent, which consists of an introductory letter (**p** or **P**) and an optionally signed decimal integer that represents the exponent as a power of 2. + +In either form, if there isn't an exponent part or a radix point character, a radix point character is assumed to follow the last digit in the string. + +Case is ignored in both the **INF** and **NAN** forms. The first character that doesn't fit one of these forms stops the scan. The UCRT versions of these functions don't support conversion of Fortran-style (**d** or **D**) exponent letters. This non-standard extension was supported by earlier versions of the CRT, and may be a breaking change for your code. The UCRT versions support hexadecimal strings and round-tripping of INF and NAN values, which weren't supported in earlier versions. This can also cause breaking changes in your code. For example, the string "0x1a" would be interpreted by **strtod** as 0.0 in previous versions, but as 26.0 in the UCRT version. diff --git a/docs/mfc/reference/ccombobox-class.md b/docs/mfc/reference/ccombobox-class.md index 7b75062e8ee..207cf92f273 100644 --- a/docs/mfc/reference/ccombobox-class.md +++ b/docs/mfc/reference/ccombobox-class.md @@ -1,6 +1,7 @@ --- title: "CComboBox Class" -ms.date: "11/04/2016" +description: "API reference for the MFC Windows combo box class CComboBox" +ms.date: "08/27/2020" f1_keywords: ["CComboBox", "AFXWIN/CComboBox", "AFXWIN/CComboBox::CComboBox", "AFXWIN/CComboBox::AddString", "AFXWIN/CComboBox::Clear", "AFXWIN/CComboBox::CompareItem", "AFXWIN/CComboBox::Copy", "AFXWIN/CComboBox::Create", "AFXWIN/CComboBox::Cut", "AFXWIN/CComboBox::DeleteItem", "AFXWIN/CComboBox::DeleteString", "AFXWIN/CComboBox::Dir", "AFXWIN/CComboBox::DrawItem", "AFXWIN/CComboBox::FindString", "AFXWIN/CComboBox::FindStringExact", "AFXWIN/CComboBox::GetComboBoxInfo", "AFXWIN/CComboBox::GetCount", "AFXWIN/CComboBox::GetCueBanner", "AFXWIN/CComboBox::GetCurSel", "AFXWIN/CComboBox::GetDroppedControlRect", "AFXWIN/CComboBox::GetDroppedState", "AFXWIN/CComboBox::GetDroppedWidth", "AFXWIN/CComboBox::GetEditSel", "AFXWIN/CComboBox::GetExtendedUI", "AFXWIN/CComboBox::GetHorizontalExtent", "AFXWIN/CComboBox::GetItemData", "AFXWIN/CComboBox::GetItemDataPtr", "AFXWIN/CComboBox::GetItemHeight", "AFXWIN/CComboBox::GetLBText", "AFXWIN/CComboBox::GetLBTextLen", "AFXWIN/CComboBox::GetLocale", "AFXWIN/CComboBox::GetMinVisible", "AFXWIN/CComboBox::GetTopIndex", "AFXWIN/CComboBox::InitStorage", "AFXWIN/CComboBox::InsertString", "AFXWIN/CComboBox::LimitText", "AFXWIN/CComboBox::MeasureItem", "AFXWIN/CComboBox::Paste", "AFXWIN/CComboBox::ResetContent", "AFXWIN/CComboBox::SelectString", "AFXWIN/CComboBox::SetCueBanner", "AFXWIN/CComboBox::SetCurSel", "AFXWIN/CComboBox::SetDroppedWidth", "AFXWIN/CComboBox::SetEditSel", "AFXWIN/CComboBox::SetExtendedUI", "AFXWIN/CComboBox::SetHorizontalExtent", "AFXWIN/CComboBox::SetItemData", "AFXWIN/CComboBox::SetItemDataPtr", "AFXWIN/CComboBox::SetItemHeight", "AFXWIN/CComboBox::SetLocale", "AFXWIN/CComboBox::SetMinVisibleItems", "AFXWIN/CComboBox::SetTopIndex", "AFXWIN/CComboBox::ShowDropDown"] helpviewer_keywords: ["CComboBox [MFC], CComboBox", "CComboBox [MFC], AddString", "CComboBox [MFC], Clear", "CComboBox [MFC], CompareItem", "CComboBox [MFC], Copy", "CComboBox [MFC], Create", "CComboBox [MFC], Cut", "CComboBox [MFC], DeleteItem", "CComboBox [MFC], DeleteString", "CComboBox [MFC], Dir", "CComboBox [MFC], DrawItem", "CComboBox [MFC], FindString", "CComboBox [MFC], FindStringExact", "CComboBox [MFC], GetComboBoxInfo", "CComboBox [MFC], GetCount", "CComboBox [MFC], GetCueBanner", "CComboBox [MFC], GetCurSel", "CComboBox [MFC], GetDroppedControlRect", "CComboBox [MFC], GetDroppedState", "CComboBox [MFC], GetDroppedWidth", "CComboBox [MFC], GetEditSel", "CComboBox [MFC], GetExtendedUI", "CComboBox [MFC], GetHorizontalExtent", "CComboBox [MFC], GetItemData", "CComboBox [MFC], GetItemDataPtr", "CComboBox [MFC], GetItemHeight", "CComboBox [MFC], GetLBText", "CComboBox [MFC], GetLBTextLen", "CComboBox [MFC], GetLocale", "CComboBox [MFC], GetMinVisible", "CComboBox [MFC], GetTopIndex", "CComboBox [MFC], InitStorage", "CComboBox [MFC], InsertString", "CComboBox [MFC], LimitText", "CComboBox [MFC], MeasureItem", "CComboBox [MFC], Paste", "CComboBox [MFC], ResetContent", "CComboBox [MFC], SelectString", "CComboBox [MFC], SetCueBanner", "CComboBox [MFC], SetCurSel", "CComboBox [MFC], SetDroppedWidth", "CComboBox [MFC], SetEditSel", "CComboBox [MFC], SetExtendedUI", "CComboBox [MFC], SetHorizontalExtent", "CComboBox [MFC], SetItemData", "CComboBox [MFC], SetItemDataPtr", "CComboBox [MFC], SetItemHeight", "CComboBox [MFC], SetLocale", "CComboBox [MFC], SetMinVisibleItems", "CComboBox [MFC], SetTopIndex", "CComboBox [MFC], ShowDropDown"] ms.assetid: 4e73b5df-0d2e-4658-9706-38133fb10513 @@ -811,6 +812,7 @@ The length (in bytes) of the string, excluding the terminating null character. I ### Remarks The second form of this member function fills a `CString` object with the item's text. +If *nIndex* is invalid, this function throws an `E_INVALIDARG` exception (code -2147024809, 0x80070057). ### Example diff --git a/docs/mfc/reference/cobarray-class.md b/docs/mfc/reference/cobarray-class.md index 03622a26b08..573f1ba7908 100644 --- a/docs/mfc/reference/cobarray-class.md +++ b/docs/mfc/reference/cobarray-class.md @@ -1,6 +1,7 @@ --- title: "CObArray Class" -ms.date: "08/26/2020" +description: "API reference for the `CObArray` `MFC` class which stores `CObject` pointers in an array." +ms.date: "08/27/2020" f1_keywords: ["CObArray", "AFXCOLL/CObArray", "AFXCOLL/CObArray::CObArray", "AFXCOLL/CObArray::Add", "AFXCOLL/CObArray::Append", "AFXCOLL/CObArray::Copy", "AFXCOLL/CObArray::ElementAt", "AFXCOLL/CObArray::FreeExtra", "AFXCOLL/CObArray::GetAt", "AFXCOLL/CObArray::GetCount", "AFXCOLL/CObArray::GetData", "AFXCOLL/CObArray::GetSize", "AFXCOLL/CObArray::GetUpperBound", "AFXCOLL/CObArray::InsertAt", "AFXCOLL/CObArray::IsEmpty", "AFXCOLL/CObArray::RemoveAll", "AFXCOLL/CObArray::RemoveAt", "AFXCOLL/CObArray::SetAt", "AFXCOLL/CObArray::SetAtGrow", "AFXCOLL/CObArray::SetSize"] helpviewer_keywords: ["CObArray [MFC], CObArray", "CObArray [MFC], Add", "CObArray [MFC], Append", "CObArray [MFC], Copy", "CObArray [MFC], ElementAt", "CObArray [MFC], FreeExtra", "CObArray [MFC], GetAt", "CObArray [MFC], GetCount", "CObArray [MFC], GetData", "CObArray [MFC], GetSize", "CObArray [MFC], GetUpperBound", "CObArray [MFC], InsertAt", "CObArray [MFC], IsEmpty", "CObArray [MFC], RemoveAll", "CObArray [MFC], RemoveAt", "CObArray [MFC], SetAt", "CObArray [MFC], SetAtGrow", "CObArray [MFC], SetSize"] ms.assetid: 27894efd-2370-4776-9ed9-24a98492af17 @@ -110,12 +111,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR Add(BYTE newElement);`

`throw(CMemoryException *);`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR Add(DWORD newElement);`

`throw(CMemoryException *);`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR Add(BYTE newElement);`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR Add(DWORD newElement);`

`throw(CMemoryException*);`| |[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR Add(void * newElement);`

`throw(CMemoryException*);`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR Add(LPCTSTR newElement);`

`throw(CMemoryException *);`

`INT_PTR Add(const CString& newElement);`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR Add(UINT newElement);`

`throw(CMemoryException *);`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR Add(WORD newElement);`

`throw(CMemoryException *);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR Add(LPCTSTR newElement); throw(CMemoryException*);`

`INT_PTR Add(const CString& newElement);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR Add(UINT newElement);`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR Add(WORD newElement);`

`throw(CMemoryException*);`| ### Example @@ -186,7 +187,7 @@ Source of the elements to be copied to the array. ### Remarks -`Copy` does not free memory; however, if necessary, `Copy` may allocate extra memory to accommodate the elements copied to the array. +`Copy` doesn't free memory. If necessary, `Copy` may allocate extra memory to accommodate the elements copied to the array. The following table shows other member functions that are similar to `CObArray::Copy`. @@ -221,12 +222,12 @@ The following table shows other constructors that are similar to `CObArray::CObA |Class|Constructor| |-----------|-----------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`CByteArray( );`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`CDWordArray( );`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`CPtrArray( );`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CStringArray( );`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`CUIntArray( );`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`CWordArray( );`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`CByteArray();`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`CDWordArray();`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`CPtrArray();`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CStringArray();`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`CUIntArray();`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`CWordArray();`| ### Example @@ -251,15 +252,15 @@ A reference to a `CObject` pointer. ### Remarks -It is used to implement the left-side assignment operator for arrays. Note that this is an advanced function that should be used only to implement special array operators. +It's used to implement the left-side assignment operator for arrays. This is an advanced function that should be used only to implement special array operators. The following table shows other member functions that are similar to `CObArray::ElementAt`. |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)`BYTE& ElementAt(INT_PTR nIndex);`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DOORN& ElementAt(INT_PTR nIndex);`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\*& ElementAt(INT_PTR nIndex);`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE& ElementAt(INT_PTR nIndex);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD& ElementAt(INT_PTR nIndex);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void*& ElementAt(INT_PTR nIndex);`| |[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString& ElementAt(INT_PTR nIndex);`| |[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT& ElementAt(INT_PTR nIndex);`| |[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD& ElementAt(INT_PTR nIndex);`| @@ -284,12 +285,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void FreeExtra( );`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void FreeExtra( );`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void FreeExtra( );`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void FreeExtra( );`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void FreeExtra( );`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void FreeExtra( );`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void FreeExtra();`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void FreeExtra();`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void FreeExtra();`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void FreeExtra();`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void FreeExtra();`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void FreeExtra();`| ### Example @@ -321,12 +322,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE GetAt( INT_PTR nIndex) const;`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD GetAt( INT_PTR nIndex) const;`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\* GetAt( INT_PTR nIndex) const;`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString GetAt( INT_PTR nIndex) const;`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT GetAt( INT_PTR nIndex) const;`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD GetAt( INT_PTR nIndex) const;`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE GetAt(INT_PTR nIndex) const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD GetAt(INT_PTR nIndex) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void* GetAt(INT_PTR nIndex) const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString GetAt(INT_PTR nIndex) const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT GetAt(INT_PTR nIndex) const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD GetAt(INT_PTR nIndex) const;`| ### Example @@ -354,12 +355,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetCount( ) const;`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetCount( ) const;`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetCount( ) const;`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetCount( ) const;`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetCount( ) const;`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetCount( ) const;`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetCount() const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetCount() const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetCount() const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetCount() const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetCount() const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetCount() const;`| ### Example @@ -455,12 +456,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetUpperBound( ) const;`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetUpperBound( ) const;`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetUpperBound( ) const;`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetUpperBound( ) const;`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetUpperBound( ) const;`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetUpperBound( ) const;`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR GetUpperBound() const;`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR GetUpperBound() const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR GetUpperBound() const;`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR GetUpperBound() const;`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR GetUpperBound() const;`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR GetUpperBound() const;`| ### Example @@ -506,18 +507,18 @@ The first version of `InsertAt` inserts one element (or multiple copies of an el The second version inserts all the elements from another `CObArray` collection, starting at the *nStartIndex* position. -The `SetAt` function, in contrast, replaces one specified array element and does not shift any elements. +The `SetAt` function, in contrast, replaces one specified array element and doesn't shift any elements. The following table shows other member functions that are similar to `CObArray::InsertAt`. |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void InsertAt(INT_PTR nIndex, BYTE newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CByteArray * pNewArray);`

`throw(CMemoryException *);`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void InsertAt(INT_PTR nIndex, DWORD newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CDWordArray * pNewArray);`

`throw(CMemoryException *);`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void InsertAt(INT_PTR nIndex, void * newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CPtrArray * pNewArray);`

`throw(CMemoryException *);`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void InsertAt(INT_PTR nIndex, LPCTSTR newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CStringArray * pNewArray);`

`throw(CMemoryException *);`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void InsertAt(INT_PTR nIndex, UINT newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CUIntArray * pNewArray);`

`throw(CMemoryException *);`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void InsertAt(INT_PTR nIndex, WORD newElement, int nCount= 1 );`

`throw(CMemoryException *);`

`void InsertAt(INT_PTR nStartIndex, CWordArray * pNewArray);`

`throw(CMemoryException *);`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void InsertAt(INT_PTR nIndex, BYTE newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CByteArray* pNewArray);`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void InsertAt(INT_PTR nIndex, DWORD newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CDWordArray* pNewArray);`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void InsertAt(INT_PTR nIndex, void* newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CPtrArray* pNewArray);`

`throw(CMemoryException*);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void InsertAt(INT_PTR nIndex, LPCTSTR newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CStringArray* pNewArray);`

`throw(CMemoryException*);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void InsertAt(INT_PTR nIndex, UINT newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CUIntArray* pNewArray);`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void InsertAt(INT_PTR nIndex, WORD newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CWordArray* pNewArray);`

`throw(CMemoryException*);`| ### Example @@ -557,7 +558,7 @@ CObject* operator[](int_ptr nindex) const; ### Remarks -The first operator, called for arrays that are not **`const`**, may be used on either the right (r-value) or the left (l-value) of an assignment statement. The second, called for **`const`** arrays, may be used only on the right. +The first operator, called for arrays that aren't **`const`**, may be used on either the right (r-value) or the left (l-value) of an assignment statement. The second, called for **`const`** arrays, may be used only on the right. The Debug version of the library asserts if the subscript (either on the left or right side of an assignment statement) is out of bounds. @@ -567,7 +568,7 @@ The following table shows other operators that are similar to `CObArray::operato |-----------|--------------| |[CByteArray](../../mfc/reference/cbytearray-class.md)|`BYTE& operator [](INT_PTR nindex);`

`BYTE operator [](INT_PTR nindex) const;`| |[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`DWORD& operator [](INT_PTR nindex);`

`DWORD operator [](INT_PTR nindex) const;`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void\*& operator [](INT_PTR nindex);`

`void* operator [](INT_PTR nindex) const;`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void*& operator [](INT_PTR nindex);`

`void* operator [](INT_PTR nindex) const;`| |[CStringArray](../../mfc/reference/cstringarray-class.md)|`CString& operator [](INT_PTR nindex);`

`CString operator [](INT_PTR nindex) const;`| |[CUIntArray](../../mfc/reference/cuintarray-class.md)|`UINT& operator [](INT_PTR nindex);`

`UINT operator [](INT_PTR nindex) const;`| |[CWordArray](../../mfc/reference/cwordarray-class.md)|`WORD& operator [](INT_PTR nindex);`

`WORD operator [](INT_PTR nindex) const;`| @@ -580,7 +581,7 @@ See [CObList::CObList](../../mfc/reference/coblist-class.md#coblist) for a listi ## CObArray::RemoveAll -Removes all the pointers from this array but does not actually delete the `CObject` objects. +Removes all the pointers from this array but doesn't actually delete the `CObject` objects. ```cpp void RemoveAll(); @@ -629,11 +630,11 @@ The number of elements to remove. ### Remarks -In the process, it shifts down all the elements above the removed element(s). It decrements the upper bound of the array but does not free memory. +In the process, it shifts down all the elements above the removed element(s). It decrements the upper bound of the array but doesn't free memory. If you try to remove more elements than are contained in the array above the removal point, then the Debug version of the library asserts. -The `RemoveAt` function removes the `CObject` pointer from the array, but it does not delete the object itself. +The `RemoveAt` function removes the `CObject` pointer from the array, but it doesn't delete the object itself. The following table shows other member functions that are similar to `CObArray::RemoveAt`. @@ -679,9 +680,9 @@ The object pointer to be inserted in this array. A `NULL` value is allowed. ### Remarks -`SetAt` will not cause the array to grow. Use `SetAtGrow` if you want the array to grow automatically. +`SetAt` won't cause the array to grow. Use `SetAtGrow` if you want the array to grow automatically. -You must ensure that your index value represents a valid position in the array. If it is out of bounds, then the Debug version of the library asserts. +Ensure that your index value represents a valid position in the array. If it's out of bounds, then the Debug version of the library asserts. The following table shows other member functions that are similar to `CObArray::SetAt`. @@ -734,12 +735,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, BYTE** `newElement` **);**

**throw( CMemoryException\* );**| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, DWORD** `newElement` **);**

**throw( CMemoryException\* );**| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, void** \* `newElement` **);**

**throw( CMemoryException\* );**| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, LPCTSTR** `newElement` **);**

**throw( CMemoryException\* );**| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, UINT** `newElement` **);**

**throw( CMemoryException\* );**| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|**void SetAtGrow( INT_PTR** `nIndex` **, WORD** `newElement` **);**

**throw( CMemoryException\* );**| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetAtGrow(INT_PTR nIndex, BYTE newElement );`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, DWORD newElement );`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetAtGrow(INT_PTR nIndex, void* newElement);`

`throw( CMemoryException* );`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetAtGrow(INT_PTR nIndex, LPCTSTR newElement );`

`throw(CMemoryException*);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetAtGrow(INT_PTR nIndex, UINT newElement );`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, WORD newElement );`

`throw(CMemoryException*);`| ### Example @@ -781,18 +782,18 @@ If the new size is smaller than the old size, then the array is truncated and al The *nGrowBy* parameter affects internal memory allocation while the array is growing. Its use never affects the array size as reported by `GetSize` and `GetUpperBound`. -If the size of the array has grown, all newly allocated **CObject** \* pointers are set to `NULL`. +If the size of the array has grown, all newly allocated `CObject *` pointers are set to `NULL`. The following table shows other member functions that are similar to `CObArray::SetSize`. |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1 );`

`throw(CMemoryException * );`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| ### Example From f3d2e32828c5f89b57e6c84e2299ad245e3012cd Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Thu, 27 Aug 2020 13:09:35 -0700 Subject: [PATCH 6/7] fix metadata - couple acrolinx fixes --- .../reference/strtod-strtod-l-wcstod-wcstod-l.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md index 3ca3e6ef13a..ac3de76c299 100644 --- a/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md +++ b/docs/c-runtime-library/reference/strtod-strtod-l-wcstod-wcstod-l.md @@ -1,6 +1,6 @@ --- title: "strtod, _strtod_l, wcstod, _wcstod_l" -description: ""API reference for strtod, _strtod_l, wcstod, _wcstod_l, which convert strings to a double-precision value." +description: "API reference for strtod, _strtod_l, wcstod, _wcstod_l, which convert strings to a double-precision value." ms.date: "08/27/2020" api_name: ["wcstod", "_wcstod_l", "_strtod_l", "strtod", "_o__strtod_l", "_o__wcstod_l", "_o_strtod", "_o_wcstod"] api_location: ["msvcrt.dll", "msvcr80.dll", "msvcr90.dll", "msvcr100.dll", "msvcr100_clr0400.dll", "msvcr110.dll", "msvcr110_clr0400.dll", "msvcr120.dll", "msvcr120_clr0400.dll", "ucrtbase.dll", "api-ms-win-crt-convert-l1-1-0.dll", "api-ms-win-crt-private-l1-1-0.dll"] @@ -50,7 +50,7 @@ The locale to use. ## Return Value -**strtod** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-**HUGE_VAL**. The sign of **HUGE_VAL** matches the sign of the value that cannot be represented. **strtod** returns `0` if no conversion can be performed or an underflow occurs. +**strtod** returns the value of the floating-point number, except when the representation would cause an overflow, in which case the function returns +/-**HUGE_VAL**. The sign of **HUGE_VAL** matches the sign of the value that can't be represented. **strtod** returns `0` if no conversion can be performed or an underflow occurs. **wcstod** returns values analogously to **strtod**: @@ -61,7 +61,7 @@ For more information on this and other return codes, see [_doserrno, errno, _sys ## Remarks -Each function converts the input string *strSource* to a **`double`**. The **strtod** function converts *strSource* to a double-precision value. **strtod** stops reading the string *strSource* at the first character it cannot recognize as part of a number. This character may be the terminating null character. **wcstod** is a wide-character version of **strtod**; its *strSource* argument is a wide-character string. These functions behave identically otherwise. +Each function converts the input string *strSource* to a **`double`**. The **strtod** function converts *strSource* to a double-precision value. **strtod** stops reading the string *strSource* at the first character it can't recognize as part of a number. This character may be the terminating null character. **wcstod** is a wide-character version of **strtod**; its *strSource* argument is a wide-character string. These functions behave identically otherwise. By default, this function's global state is scoped to the application. To change this, see [Global state in the CRT](../global-state.md). From af2337960b630af4efbffff9c29f250dc51af85b Mon Sep 17 00:00:00 2001 From: Tyler Whitney Date: Thu, 27 Aug 2020 13:31:58 -0700 Subject: [PATCH 7/7] tighten up a couple things --- docs/mfc/reference/ccombobox-class.md | 4 +-- docs/mfc/reference/cobarray-class.md | 38 +++++++++++++-------------- 2 files changed, 21 insertions(+), 21 deletions(-) diff --git a/docs/mfc/reference/ccombobox-class.md b/docs/mfc/reference/ccombobox-class.md index 207cf92f273..c150a157ae8 100644 --- a/docs/mfc/reference/ccombobox-class.md +++ b/docs/mfc/reference/ccombobox-class.md @@ -811,8 +811,8 @@ The length (in bytes) of the string, excluding the terminating null character. I ### Remarks -The second form of this member function fills a `CString` object with the item's text. -If *nIndex* is invalid, this function throws an `E_INVALIDARG` exception (code -2147024809, 0x80070057). +The second form of this member function fills a `CString` object with the item's text.\ +If *nIndex* is invalid, this function throws an `E_INVALIDARG` exception (error code: `-2147024809`, `0x80070057`). ### Example diff --git a/docs/mfc/reference/cobarray-class.md b/docs/mfc/reference/cobarray-class.md index 573f1ba7908..f633ba3cadb 100644 --- a/docs/mfc/reference/cobarray-class.md +++ b/docs/mfc/reference/cobarray-class.md @@ -113,7 +113,7 @@ The following table shows other member functions that are similar to `CObArray:: |-----------|---------------------| |[CByteArray](../../mfc/reference/cbytearray-class.md)|`INT_PTR Add(BYTE newElement);`

`throw(CMemoryException*);`| |[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`INT_PTR Add(DWORD newElement);`

`throw(CMemoryException*);`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR Add(void * newElement);`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`INT_PTR Add(void* newElement);`

`throw(CMemoryException*);`| |[CStringArray](../../mfc/reference/cstringarray-class.md)|`INT_PTR Add(LPCTSTR newElement); throw(CMemoryException*);`

`INT_PTR Add(const CString& newElement);`| |[CUIntArray](../../mfc/reference/cuintarray-class.md)|`INT_PTR Add(UINT newElement);`

`throw(CMemoryException*);`| |[CWordArray](../../mfc/reference/cwordarray-class.md)|`INT_PTR Add(WORD newElement);`

`throw(CMemoryException*);`| @@ -513,12 +513,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void InsertAt(INT_PTR nIndex, BYTE newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CByteArray* pNewArray);`

`throw(CMemoryException*);`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void InsertAt(INT_PTR nIndex, DWORD newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CDWordArray* pNewArray);`

`throw(CMemoryException*);`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void InsertAt(INT_PTR nIndex, void* newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CPtrArray* pNewArray);`

`throw(CMemoryException*);`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void InsertAt(INT_PTR nIndex, LPCTSTR newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CStringArray* pNewArray);`

`throw(CMemoryException*);`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void InsertAt(INT_PTR nIndex, UINT newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CUIntArray* pNewArray);`

`throw(CMemoryException*);`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void InsertAt(INT_PTR nIndex, WORD newElement, int nCount = 1 );`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CWordArray* pNewArray);`

`throw(CMemoryException*);`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void InsertAt(INT_PTR nIndex, BYTE newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CByteArray* pNewArray);`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void InsertAt(INT_PTR nIndex, DWORD newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CDWordArray* pNewArray);`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void InsertAt(INT_PTR nIndex, void* newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CPtrArray* pNewArray);`

`throw(CMemoryException*);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void InsertAt(INT_PTR nIndex, LPCTSTR newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CStringArray* pNewArray);`

`throw(CMemoryException*);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void InsertAt(INT_PTR nIndex, UINT newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CUIntArray* pNewArray);`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void InsertAt(INT_PTR nIndex, WORD newElement, int nCount = 1);`

`throw(CMemoryException*);`

`void InsertAt(INT_PTR nStartIndex, CWordArray* pNewArray);`

`throw(CMemoryException*);`| ### Example @@ -735,12 +735,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetAtGrow(INT_PTR nIndex, BYTE newElement );`

`throw(CMemoryException*);`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, DWORD newElement );`

`throw(CMemoryException*);`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetAtGrow(INT_PTR nIndex, void* newElement);`

`throw( CMemoryException* );`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetAtGrow(INT_PTR nIndex, LPCTSTR newElement );`

`throw(CMemoryException*);`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetAtGrow(INT_PTR nIndex, UINT newElement );`

`throw(CMemoryException*);`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, WORD newElement );`

`throw(CMemoryException*);`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetAtGrow(INT_PTR nIndex, BYTE newElement);`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, DWORD newElement);`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetAtGrow(INT_PTR nIndex, void* newElement);`

`throw( CMemoryException*);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetAtGrow(INT_PTR nIndex, LPCTSTR newElement);`

`throw(CMemoryException*);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetAtGrow(INT_PTR nIndex, UINT newElement);`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetAtGrow(INT_PTR nIndex, WORD newElement);`

`throw(CMemoryException*);`| ### Example @@ -788,12 +788,12 @@ The following table shows other member functions that are similar to `CObArray:: |Class|Member Function| |-----------|---------------------| -|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| -|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| -|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| -|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| -|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| -|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException* );`| +|[CByteArray](../../mfc/reference/cbytearray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| +|[CDWordArray](../../mfc/reference/cdwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| +|[CPtrArray](../../mfc/reference/cptrarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| +|[CStringArray](../../mfc/reference/cstringarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| +|[CUIntArray](../../mfc/reference/cuintarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| +|[CWordArray](../../mfc/reference/cwordarray-class.md)|`void SetSize(INT_PTR nNewSize, int nGrowBy = -1);`

`throw(CMemoryException*);`| ### Example