Observação
O acesso a essa página exige autorização. Você pode tentar entrar ou alterar diretórios.
O acesso a essa página exige autorização. Você pode tentar alterar os diretórios.
The new home for Visual Studio documentation is Visual Studio 2017 Documentation on docs.microsoft.com.
The latest version of this topic can be found at deque::to_array (STL/CLR).
Copies the controlled sequence to a new array.
Syntax
cli::array<Value>^ to_array();
Remarks
The member function returns an array containing the controlled sequence. You use it to obtain a copy of the controlled sequence in array form.
Example
// cliext_deque_to_array.cpp
// compile with: /clr
#include <cliext/deque>
int main()
{
cliext::deque<wchar_t> c1;
c1.push_back(L'a');
c1.push_back(L'b');
c1.push_back(L'c');
// copy the container and modify it
cli::array<wchar_t>^ a1 = c1.to_array();
c1.push_back(L'd');
for each (wchar_t elem in c1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
// display the earlier array copy
for each (wchar_t elem in a1)
System::Console::Write(" {0}", elem);
System::Console::WriteLine();
return (0);
}
a b c d
a b c
Requirements
Header: <cliext/deque>
Namespace: cliext