Making this code generic with C++ Standard Lib
vector<D3DXFRAME_EX>& Find (std::string& FrameName)
{
vector<D3DXFRAME_EX> pFrame;
vector<D3DXFRAME_EX> pFramePtr;
if (Name && FrameName.c_str() && !FrameName.compare(Name))
return this;
if (pFramePtr == (vector<D3DXFRAME_EX>)pFrameSibling)
{
if ((pFrame = pFramePtr->Find(FrameName)))
return pFrame;
}
if (pFramePtr == (vector<D3DXFRAME_EX>)pFrameFirstChild)
{
if (pFrame = pFramePtr->Find(FrameName))
return pFrame;
}
return NULL;
}
===============================
I had these error messages
Warning 1 warning C4819: The file contains a character that cannot be
represented in the current code page (950). Save the file in Unicode format
to prevent data loss c:\program files\microsoft directx sdk (october
2006)\include\d3d9types.h 1385
Error 2 error C2440: 'return' : cannot convert from 'D3DXFRAME_EX *const '
to 'std::vector<_Ty> &' c:\documents and settings\luckie\osm\direct3d.h 47
Error 3 error C2440: 'type cast' : cannot convert from '_D3DXFRAME *' to
'std::vector<_Ty>' c:\documents and settings\luckie\osm\direct3d.h 49
Error 4 error C2819: type 'std::vector<_Ty>' does not have an overloaded
member 'operator ->' c:\documents and settings\luckie\osm\direct3d.h 51
Error 5 error C2039: 'Find' : is not a member of 'std::vector<_Ty>'
c:\documents and settings\luckie\osm\direct3d.h 51
Warning 6 warning C4172: returning address of local variable or temporary
c:\documents and settings\luckie\osm\direct3d.h 52
Error 7 error C2440: 'type cast' : cannot convert from '_D3DXFRAME *' to
'std::vector<_Ty>' c:\documents and settings\luckie\osm\direct3d.h 55
Error 8 error C2819: type 'std::vector<_Ty>' does not have an overloaded
member 'operator ->' c:\documents and settings\luckie\osm\direct3d.h 57
Error 9 error C2039: 'Find' : is not a member of 'std::vector<_Ty>'
c:\documents and settings\luckie\osm\direct3d.h 57
Warning 10 warning C4172: returning address of local variable or temporary
c:\documents and settings\luckie\osm\direct3d.h 58
Error 11 error C2440: 'return' : cannot convert from 'int' to
'std::vector<_Ty> &' c:\documents and settings\luckie\osm\direct3d.h 62
======================================================
Any ideas?
Thanks
Jack