Search:

Type: Posts; User: anduril462

Search: Search took 0.16 seconds.

  1. Replies
    9
    Views
    2,943

    I don't know with out seeing your whole code. ...

    I don't know with out seeing your whole code. You've made some changes (notably adding an index field), so I'm not sure you're building your list with correct index values. Run through your code in...
  2. Replies
    9
    Views
    2,943

    Oh, okay. Well, I still recommend ditching your...

    Oh, okay. Well, I still recommend ditching your 'current' variable. Just ask for the input 3 times:


    do {
    print "Enter a command: "
    read line
    add digits to first_num

    print...
  3. Replies
    9
    Views
    2,943

    Your storeNum and printList look great. A few...

    Your storeNum and printList look great. A few small things to clear up first:

    Here's what happens when I compile your program:


    $ gcc -Wall -g -std=c99 list.c -o list
    list.c: In function...
  4. Replies
    9
    Views
    2,943

    I think if there is a carry left over at the end,...

    I think if there is a carry left over at the end, you have to allocate another new_item_ptr and insert that at the head of the list.
  5. Replies
    9
    Views
    2,943

    The reason result is pointing to the same place...

    The reason result is pointing to the same place is because that's what you told it to do. I'm not sure what you expect to happen, so I can't really offer a solution. I can say, however, that there...
Results 1 to 5 of 5