Search:

Type: Posts; User: chinook86

Search: Search took 0.01 seconds.

  1. EDIT Solved I was forgetting to malloc the sem...

    EDIT Solved I was forgetting to malloc the sem pointers.
  2. Sorry that was just bad formatting of my code...

    Sorry that was just bad formatting of my code when I pasted it in here. The colons and if statements are fine in my code. sem_init() is a system call so I really don't have any control on what...
  3. next question. mailbox...

    next question.

    mailbox *new=malloc(sizeof(mailbox));
    if(sem_init(new->mailavailable,0,0));

    The program segfaults in the sem_init()
  4. My thanks.

    My thanks.
  5. error: expected specifier-qualifier-list before

    I am trying to make two linked lists. My nodes are defined as follows:

    typedef struct{
    char *message;
    int msglength;
    pthread_t sender;
    mail *next;
    }mail;

    typedef struct{
  6. Replies
    7
    Views
    5,473

    Thanks for the help guys. This was a programing...

    Thanks for the help guys. This was a programing assignment designed to learn system calls on a unix based system. Therefore, I decided to use the system("cat -u ....") command.
  7. Replies
    7
    Views
    5,473

    Merge Binary Files

    I have a program that creates multiple binary files. The problem is that I need to merge the files together. I can use the cat command afterwards and merge the files by hand. I would like however to...
  8. Replies
    4
    Views
    1,483

    It works if i do that. However, As soon as I try...

    It works if i do that. However, As soon as I try to access an element from the struct by doing p1->start I get a seg fault. It is just starting to ........ me off.
  9. Replies
    4
    Views
    1,483

    The hash can hold any object.

    The hash can hold any object.
  10. Replies
    4
    Views
    1,483

    Pointers and hashes

    Here we go. So i passed a struct object into my hashtable with a key. The hashtable when called upon with the key returns a (void *). I want to set my local struct equal to the data at that (void *)....
  11. Replies
    7
    Views
    1,566

    Yah I forgot about that. I how would I pass that...

    Yah I forgot about that. I how would I pass that back then. The function accepts a string splits it up into integers and puts it into an array. Now, I need that array but I am not supposed to use...
  12. Replies
    7
    Views
    1,566

    Returning Arrays as pointers

    Ok i have a function that returns an address to an array of ints which contains 4 items. How do I assign the contents of that address to a local variable.

    The return statements is this return...
Results 1 to 12 of 12