S
Sims
Hi,
Here is the code that .NET does not seem to like, but as far as i can see it
is valid C++ code.
Am i wrong?
....
// vector headers
....
struct MYSTRUCT
{
int m_iSomething;
};
typedef std::vector< MYSTRUCT, std::allocator<MYSTRUCT > > MYSTRUCT_VECTOR;
....
// Within class
....
MYSTRUCT_VECTOR g_MyVector;
int CMyClass::FindSomeThing( int pos )
{
// return item
}
MYSTRUCT * CMyClass::GetStructure( int iSomething)
{
// Find the item in the vector
int pos = FindSomeThing( iSomething );
// Anything found
if( pos <0 ) return NULL;
// return what we have
return (g_MyVector.begin()+pos);
}
The code above should work i think but .NET 2002 gives me an error? What am
i missing?
Many thanks
Sims
Here is the code that .NET does not seem to like, but as far as i can see it
is valid C++ code.
Am i wrong?
....
// vector headers
....
struct MYSTRUCT
{
int m_iSomething;
};
typedef std::vector< MYSTRUCT, std::allocator<MYSTRUCT > > MYSTRUCT_VECTOR;
....
// Within class
....
MYSTRUCT_VECTOR g_MyVector;
int CMyClass::FindSomeThing( int pos )
{
// return item
}
MYSTRUCT * CMyClass::GetStructure( int iSomething)
{
// Find the item in the vector
int pos = FindSomeThing( iSomething );
// Anything found
if( pos <0 ) return NULL;
// return what we have
return (g_MyVector.begin()+pos);
}
The code above should work i think but .NET 2002 gives me an error? What am
i missing?
Many thanks
Sims