• Advertisement

Archived

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

Problem with linked list stuff...

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

I just learned how to use linked list (I'm still a newbie) and I first tested it in console (an linked list excerise) and it worked well. Then I implemented it in my game for my asteroids, and now it's having problems. The code that have problem is this: The_Asteroids *Asts; Asts = new The_Asteroids; <---- The_Asteroids is the list of the asteroids, The errors is this: C:\C++\Beyaan\Beyaan.cpp(47) : error C2501: 'Asts' : missing storage-class or type specifiers C:\C++\Beyaan\Beyaan.cpp(47) : error C2040: 'Asts' : 'int' differs in levels of indirection from 'class The_Asteroids *' C:\C++\Beyaan\Beyaan.cpp(47) : error C2440: 'initializing' : cannot convert from 'class The_Asteroids *' to 'int' What is going wrong? In the program for excerise have exact same code (except for asteroids stuff, just the basics): List *aList; aList = new List; I don't get it...
You know your game is in trouble when your AI says, in a calm, soothing voice, "I'm afraid I can't let you do that, Dave" [edited by - Zeraan on July 29, 2002 9:19:42 PM]

Share this post


Link to post
Share on other sites
Advertisement
Duh... I found the problem, I can''t do Asts = new The_Asteroids; globally, I had to do it in a function... Stupid me



You know your game is in trouble when your AI says, in a calm, soothing voice, "I''m afraid I can''t let you do that, Dave"

Share this post


Link to post
Share on other sites

  • Advertisement