CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com

Search:

Type: Posts; User: MustSeeMelons

Search: Search took 0.02 seconds.

  1. Re: A task involving linked lists and a headache

    I know, its 0<=x<4.
  2. Re: A task involving linked lists and a headache

    Forgot to delete that pointer for the bunny, anyway, it wasnt used.
    Because, rand()%4 would give me 0-4, but those positions contain Male names, i need rand()%(14 - 10)+10 gives me 10-14, which are...
  3. Re: A task involving linked lists and a headache

    Um, the Bunny doesnt have the next pointer, BunnyInList does, the Bunny it self has no idea that its in a class.
    As for the Random function, well, youre right, dont know how i didnt think of that...
  4. Re: A task involving linked lists and a headache

    Well thank you. Im not racist, but i do like to make my method names a bit more interesting, otherwise its just too plain and booring, without any character. Spices thing up.
  5. Re: A task involving linked lists and a headache

    Im happy to inform, that this is a happy post - i corrected my mess and everything is working as it should^^ (Maybe there is a small glitch somewhere, but i havent found it yet). Went through my code...
  6. Re: A task involving linked lists and a headache

    if(Head==NULL)
    {
    InList->Cur=NewBunny;
    InList->Next=Head; This is wrong

    Head is still NULL at that point, why is it wrong? Should i just use InList=NULL then?
    I tried debugging - it...
  7. Re: A task involving linked lists and a headache

    Dont have much time, but i have done some changes, created another class that handles the bunnies in the list. The sad parts is that nothing has changed :| If i create 5 bunnies and then delete with...
  8. Re: A task involving linked lists and a headache

    Well ok, thanks, understood the idea. When i create a new bunny, i create a struct inside, that has the information about the bunnies location and its neighbours. The bunny itself now is just data...
  9. Re: A task involving linked lists and a headache

    @JohnW@Wessex
    Thats what I am going to do, cant put everything together in my head.

    @Paul McKenzie
    Thanks for the post. I learned what a linked list is from tutorials, I went through 3 if i...
  10. Re: A task involving linked lists and a headache

    Thank you for your reply and advice :) Will tear this mess down peace by peace and learn to debug. I got the idea how to write the add function from a tutorial, guess it was wrong or i miss...
  11. A task involving linked lists and a headache

    Hi everyone around here, im new and im hopint to give and get help ;)
    The task is to create a linked list consisting of bunny's, the bunny is a class.
    Im having problems in managing the list...
Results 1 to 11 of 11





Click Here to Expand Forum to Full Width

Featured