R
ravenous.wolves
I'm trying to create a template function to convert from a vector of
Es, to a managed array of Es. I want this to work with std::vector, or
any other type that implements the call requirements of this function.
I get the following error on this code:
error C2143: syntax error : missing ')' before '<'
template<typename T, typename E>
E ToManaged( T<E> const & crUnmanagedVec ) __gc[]
{
int nElements = crUnmanagedVec.size();
E managedArray __gc[] = new E __gc[nElements];
for( int i = 0; i < nElements; ++i )
{
managedArray = crUnmanagedVec;
}
return managedArray;
}
Es, to a managed array of Es. I want this to work with std::vector, or
any other type that implements the call requirements of this function.
I get the following error on this code:
error C2143: syntax error : missing ')' before '<'
template<typename T, typename E>
E ToManaged( T<E> const & crUnmanagedVec ) __gc[]
{
int nElements = crUnmanagedVec.size();
E managedArray __gc[] = new E __gc[nElements];
for( int i = 0; i < nElements; ++i )
{
managedArray = crUnmanagedVec;
}
return managedArray;
}