Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

supagu

stl problems

This topic is 5462 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

this is what i am trying to do: map< LPDIRECT3DTEXTURE9, map< D3DXMATRIXA16, list< TextureBatch*> > > sceneData; the problem i think is visual studio, but maybe its not possible to have a map return another map which then returns a list?

Share this post


Link to post
Share on other sites
Advertisement
gay forusm... fixed now

yeah i left spaces at the end...

this is the closest i can get to the above:

vector< pair< LPDIRECT3DTEXTURE9, vector< pair< D3DXMATRIXA16, vector< TextureBatch*> > > > > sceneData;

that compiles fine, but i dont want to have to search throught them all so would rather the map.

i better explain what im trying to do:

have data sorted by a texture, then by a matrix, then a list of texturebatches (this contains poly information) for rendering

[edited by - supagu on July 5, 2003 3:41:38 AM]

Share this post


Link to post
Share on other sites
For a map to work, it needs to be able to perform less-than comparisons on values of the key type. D3DXMATRIXA16 doesn''t sound like a class which''d have a less-than operator.

Share this post


Link to post
Share on other sites
well, considering this doesnt work either:

map < int, map < int, list < int > > > sceneData;

i dont think its that

Share this post


Link to post
Share on other sites
map< LPDIRECT3DTEXTURE8, map< D3DXMATRIXA16, list< int* > > > mapName;

this compiled fine on my system (vc++6.0). Are you sure you're "#include"ing <list> and <map>?
Are you accessing the data the right way? maps are pretty screwy with their iterators and "->second"s and such.


[edited by - monkeyography on July 5, 2003 3:58:22 AM]

Share this post


Link to post
Share on other sites
#include <map>
#include <list>

i tryed yours (changing the 8 to a 9) and it didnt work

the error im getting is

fatal error C1063:
Error executing cl.exe.

Share this post


Link to post
Share on other sites
well i d/led the stl from here:
http://www.sgi.com/tech/stl/download.html

copied over intot he include folder, and it worked, in a little demo project i made, but then when i went to run my engine it complained about all my lists

Share this post


Link to post
Share on other sites
What compiler are you using? MSVC 6.0 (not sure what earlier versions though) already has STL.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!