• Advertisement

Archived

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

stl problems

This topic is 5347 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
Did you seperate the closing brackets with a space?
You can''t have them next to each other, they will be mistaken for the shift right operator.

Share this post


Link to post
Share on other sites
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
it has some stl stuff in the include file, like lists vectors and maps, but the map seems screwey, and when i d/l and put in the stl from the site above, it complains about all my lists iterators then, so i tryed just copying the map and files it needed over the top of the MS ones and then it complains about them templates already being defined

ah using vc6.0

maybe i should get the service pack

[edited by - supagu on July 5, 2003 10:27:30 PM]

[edited by - supagu on July 5, 2003 10:28:59 PM]

Share this post


Link to post
Share on other sites
service pack didnt help either

but this works:
http://www.stlport.org/download.html

:D :D :D

[edited by - supagu on July 5, 2003 11:51:16 PM]

Share this post


Link to post
Share on other sites

  • Advertisement