linked list

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

linked list

Post by Johan »

hi . im working on a world editor ,want to keep all my objects in multiple lists. irrlicht has a double link list class ,what i want to know is how to use it ,to be more specific i dnt know how to create it .
compulsive compiler
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

Then look at the API/docs.... It shows you how to use it...
Image Image Image
jddevnet
Posts: 17
Joined: Mon Oct 06, 2008 8:27 pm

Post by jddevnet »

I can second that. The API documentation rocks!

http://irrlicht.sourceforge.net/docu/index.html
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Re: linked list

Post by rogerborg »

Johan wrote:to be more specific i dnt know how to create it .
Can you be a bit more specific? Are you having problems with the basic issue of templated classes, or with the specific usage of irr::core::list?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

i would not ask if i knew the answer or had the information at hand .never mind il use my own linked list and drop the engines class. problem is not using it but creating it ,template arguments etc...
compulsive compiler
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

rogerborg ,yes exactly my problem i dnt know how to create it as a new list with the constructor
compulsive compiler
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

Like almost all other templated container classes (like STL)....

Code: Select all

//For a list of ints
irr::core::list<int> mylist;

//For a list of floats
irr::core::list<float> mylist;

//For a list of some random class
irr::core::list<MyRandomClass> mylist;

//Hey, you can even do pointers
irr::core::list<MyRandomClass*> mylist;
All templated classes work like this. They may require additional template parameters, but this gives you the jist.

From then on, use them like any other normal class.

Code: Select all

mylist.doSomething();
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

thank you now i know there must be something wrong somewhere else becouse thats the way i did it ,i even tried the type f32 but i keep getting a error message -internal compiler error .
compulsive compiler
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

How about you open your kimono and show us your dangling pointers?
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

rogerborg ,even when i try the exact code example he gave me i get that error so its not specific to my own code ,problem with compiler settings? i read something that the problem could come from optimization options .. il look into it sometime but for now im sorted out ,just using my own linked list class .thanx for your support
compulsive compiler
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

OK, but you'll still have a compiler problem waiting to bite you. Your DE, your rules though.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

hate those with teeth just sitting and waiting in ambush to bite me in the ass .. anyway would love to sort it out ,thanx though for everyones input
compulsive compiler
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

error message -internal compiler error .
Without knowing the exact error, I will never be able to help you more. I'll also need to know what compiler/IDE you are using. If I remember right, msvc 2003 didn't support templates at all.
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post by vitek »

Dark_Kilauea wrote:If I remember right, msvc 2003 didn't support templates at all.
You have a poor memory. :)
Johan
Posts: 32
Joined: Thu Jun 12, 2008 7:51 pm
Location: south africa

Post by Johan »

i would realy love to know exactly what the error is but supposedly the compiler gives you internal compiler error before it can evaluate what causes it so your left with just that message .i use msvc 6 on windows xp pro ,do u think that there might be diffrent compile settings on msvc 6? i did read about the error message and what could cause it ,basicly could have multiple causes ,but what i dnt get is that all other templated classes work .just as soon as i try creating the list class do i get that error.
compulsive compiler
Post Reply