std::map::iterator arithmetic problems
I don't understand why I am getting errors on this code. My goal is to
access a map by index and I find no appropriate method, so I tried
const D3DXMATRIX & Material::GetMatrix(const unsigned index,
std::string & name)
if( index < 0 || index > m_matrices.size() - 1 )
throw BaseException("Invalid index requested",
"const D3DXMATRIX & GetMatrix(const unsigned
index, std::string & name)",
Matrices::const_iterator it = m_matrices.begin();
it = it + index; // Error here!
where I have the following typedefs in the header
template <class T>
* Map of matrix attributes
* key - matrix variable name as it appears in the DirectX effect
* value - Attribute structure containing the matrix
typedef std::map<std::string, Attribute<D3DXMATRIX> > Matrices;
Anyone know how to achieve my goal?
I want to pretty much allow another specific class access to the
entire map, I just don't want to expose the details,
so I attempted this access by index along with a get size combination,
which isn't working.
|All times are GMT. The time now is 08:21 AM.|
Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.