地址在
这里。
另外分享一小段没什么用处的测试代码:
#include <iostream>
#include <string>
#include <list>
#include <algorithm>
#include <vcclr.h>
using namespace System;
int main()
{
std::list<int> lstTest;
std::copy(
std::istream_iterator<int>(std::cin),
std::istream_iterator<int>(),
std::back_insert_iterator< std::list<int> >( lstTest )
);
System::Collections::Generic::List<int>^ lstCLR = gcnew Collections::Generic::List<int>();
for( std::list<int>::const_iterator it = lstTest.begin();
it != lstTest.end();
++it )
{
lstCLR->Add( *it );
}
printf_s( "-----------------------------------------\n" );
lstCLR->Sort();
for each( int i in lstCLR )
{
Console::WriteLine( i );
}
System::Collections::Generic::List< String^ >^ lstString = gcnew Collections::Generic::List<String^>();
for( int i =0; i < 10; ++i )
{
wchar_t sz[12];
swprintf_s( sz, L"%d", i );
lstString->Add( gcnew String( sz ) );
}
std::list<std::wstring> lstStdString;
for each( String^ Str in lstString )
{
pin_ptr< const wchar_t > pStr = PtrToStringChars( Str );
lstStdString.push_back( std::wstring( pStr ) );
}
std::copy( lstStdString.begin(),
lstStdString.end(),
std::ostream_iterator< std::wstring, wchar_t >( std::wcout, L"\n" )
);
return 0;
}
这才是我经常活动的家。