runtime error

Started by
4 comments, last by dmatter 18 years, 4 months ago


class RenderQueue
{
public:
	/* type define */
        typedef std::vector<Material*> MaterialSet;
	typedef std::multimap<MaterialSet, Movable*> RenderMap;
	typedef std::pair<MaterialSet, Movable*> RenderMapPair;
	typedef std::multimap<MaterialSet, Movable*> ::iterator RenderMapIterator;
	
	void addMovable(MaterialSet, Movable *);
	void render();
private:
	RenderMap m_renderList; 
	std::vector<MaterialSet> m_materialSetList;
	GraphicDevice * m_device;

};

void RenderQueue::addMovable(MaterialSet material, Movable *Movable)
{
	m_renderList.insert(RenderMapPair(material, Movable));
}




abnormity error at addMovable() .I track it,when run to addMovable().
Advertisement
You're not making too much sense. Could you ask in more of a question rather than a couple hard-to-understand sentances?
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Another stunningly informative derek7 post [grin]

Seriously, man, you have to learn to start formulating proper questions and background information if you plan to have people help you in any way at all. Your post needs a little bit of something, such as perhaps more information on what is going wrong, code where it's going wrong, etc.
Free speech for the living, dead men tell no tales,Your laughing finger will never point again...Omerta!Sing for me now!
Quote:Original post by SirLuthor
Seriously, man, you have to learn to start formulating proper questions

Try to have some patience. He's Chinese and (obviously) not fluent in English.
John BoltonLocomotive Games (THQ)Current Project: Destroy All Humans (Wii). IN STORES NOW!
void RenderQueue::addMovable(MaterialSet material, Movable *Movable)

That shouldn't even compile, because you are using a class name as a variable. So if you're getting a runtime error something is quite wrong.

CM
Quote:Original post by Conner McCloud
void RenderQueue::addMovable(MaterialSet material, Movable *Movable)

That shouldn't even compile, because you are using a class name as a variable. So if you're getting a runtime error something is quite wrong.

CM

Perhaps he actually meant compile-time error?.

Use this code instead:
void RenderQueue::addMovable(MaterialSet material, Movable *movable){	m_renderList.insert(RenderMapPair(material, movable));}



Off topic: derek7, perhaps occasionaly use an online translator to compose longer posts, sometimes your posts are a bit hard to understand. Keep practicing english though, using a translator is fine but don't get lazy [wink]

This topic is closed to new replies.

Advertisement