Search:

Type: Posts; User: popapez

Search: Search took 0.00 seconds.

  1. OMG SO DUMB! thank you so much!

    OMG SO DUMB!

    thank you so much!
  2. hey you :) its right before the call to...

    hey you :)

    its right before the call to tokenize

    new = (struct node*)malloc(sizeof(struct node*));
    new = tokenize(line);



    btw- i figured out the issue yesterday, thanks for your help.
  3. bus error when assigning value to member of struct

    I am getting a bus error with the following line of code (and presumably the 3 similar lines following it):

    new->f1 = u;

    this is my struct:



    struct node // node for linked...
  4. Replies
    14
    Views
    3,265

    nothing has changed, same errors. :confused:

    nothing has changed, same errors. :confused:
  5. Replies
    14
    Views
    3,265

    so this is the pointer? struct node*...

    so this is the pointer?


    struct node* tokenize(char line[])
    {
    .....
    return new;

    }
  6. Replies
    14
    Views
    3,265

    i do return the pointer from my tokenize...

    i do return the pointer from my tokenize function...
  7. Replies
    14
    Views
    3,265

    so, if we do these struct node *new; new =...

    so, if we do these

    struct node *new;
    new = (struct node*)malloc(sizeof(struct node));


    in main, just before pushing or enqueueing, will the memory stay allocated until the end of main?

    I...
  8. Replies
    14
    Views
    3,265

    enqueue gets a bus error after this point, and I...

    enqueue gets a bus error after this point, and I have no idea why.... end.next should be able to point to "new" and add new nodes this way...



    void enqueue(void) // add number to queue
    {...
  9. Replies
    14
    Views
    3,265

    Either I should not have left out this subroutine...

    Either I should not have left out this subroutine or it's just in the wrong place, but here are the important lines of tokenize:

    struct node tokenize(char line[])
    {
    struct node *new;
    new =...
  10. Replies
    14
    Views
    3,265

    well, *new = tokenize(line); will fill a node...

    well, *new = tokenize(line); will fill a node with the line from the file. Then when pushed or enqueued, it is manipulated to point to a new node, right?
  11. Replies
    14
    Views
    3,265

    queue and stack implemented with linked list

    Hi, I am taking a beginner's C programming course, although I am very fluent in java so I understand the concepts, etc.

    I am implementing a stack and a queue with nodes of structs using linked...
Results 1 to 11 of 11