Jump to content
  • Advertisement

Archived

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

dark_exodus

Probelm with a list

This topic is 5225 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

using a fuzzy example I found in Game Programming gems 2 but i''m getting errors from the following line of code. typedef list< FuSMstate* > > FuzzyState_List; error message: ; missing before < can anyone point me in the right direction?

Share this post


Link to post
Share on other sites
Advertisement
try:

typedef std::list<FuSMstate*> FuzzyState_List;


or:


using namespace std;

typedef list<FuSMstate*> FuzzyState_List;



EDIT: stupid html...

[edited by - Etnu on June 5, 2004 5:03:25 PM]

Share this post


Link to post
Share on other sites

#include <list>

typedef std::list<FuSMstate*> FuzzyState_List;

//or

using std::list;
typedef list<FuSMstate*> FuzzyState_List;

//or

using namespace std;
typedef list<FuSMstate*> FuzzyState_List;

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
VS usually comes up with that error message when a type is undefined (b/c it''s in the std namespace), in this case list is undefined, so as others have suggested you''ll need to either bring std (or std::list) into the scope of the current namespace or to explicitly put std::list instead of just list (+ you need to loose a &gt; from the statement too.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!