Search:

Type: Posts; User: Norm

Search: Search took 0.08 seconds.

  1. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    Do you have the idea now of how to get the suit of the last Queen in a deck? Can you explain it?
    When you get the logic worked out, then move on to writing some code.
  2. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    Yes, you'd have to look at all the cards to know that you had seen the last queen.

    Couldn't you remember where the last one was and not have to go back and do it again?
  3. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    Suppose the deck has been altered and the number of queens is not known.
  4. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    How would you find the suit of the last Queen in a deck of cards if you were to look at them one at a time?

    The variable i is only defined inside of the for loop.
    To include statements in a for...
  5. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    The compiler can't find a definition for the variable: i at the location it is being used. A complete compiler error message would show the line where that error happened and the line number.

    ...
  6. Replies
    13
    Views
    1,594

    Re: Creating methods in a singly linked list?

    Please copy the full text of the error message and paste it here.

    The compiler will skip code that is in a comment. Put /* before and */ after the code you want skipped.
Results 1 to 6 of 6