Search:

Type: Posts; User: mmondok

Search: Search took 0.00 seconds.

  1. Replies
    2
    Views
    909

    Oh, and I am also using calloc to allocate the...

    Oh, and I am also using calloc to allocate the array size before I read in from the file.
  2. Replies
    2
    Views
    909

    reading in from a file

    I am trying to read a file into a string, but it keeps only reading one line of the file. Here is my read code:



    for(status = fgets(filebuff, MAX_LINE, inp); status != 0;
    status =...
  3. Replies
    4
    Views
    1,788

    Thank you! Next time I will check my code a...

    Thank you! Next time I will check my code a little closer before posting.
  4. Replies
    4
    Views
    1,788

    Here is my code: #include ...

    Here is my code:



    #include <string.h>
    #include <unistd.h>
    #include <stdlib.h>
    #include <stdio.h>
    #include <sys/types.h>
    #include <sys/socket.h>
  5. Replies
    4
    Views
    1,788

    Determining Latency of Web Sites

    I am writing a simple program that connects a socket to, say google, and then waits for a response. Basically, I am determining the latency of web sites over a 24 hour period. I am doing something...
  6. Thread: Using execlp

    by mmondok
    Replies
    0
    Views
    2,694

    Using execlp

    I am trying to run a program with a simple execlp command. Here is my code:



    if(fork() == 0)
    {
    if(execlp("slaveA", "37206&") == -1)
    perror("execlp failed");
    }
  7. Replies
    1
    Views
    10,537

    Multiple Ports using Sockets

    I am looking to create a distributed server that can listen on multiple ports. I have code written that works with one port, but I am not sure how to specify the server to listen on 2 ports. I put...
  8. Thread: Using pthread

    by mmondok
    Replies
    3
    Views
    1,550

    Using pthread

    We just started programming threads in class, and I am trying to call a function prthread(int argc) from my thread. Here is the code I have:



    if (pthread_create(&theThread, NULL,(void...
  9. Replies
    1
    Views
    650

    Segmentation Fault

    I am trying to open a file for reading, and it works fine when it is a seperate program, but when I place it in my main program, the for statement causes a seg fault. Here is the code that is...
  10. Replies
    1
    Views
    1,284

    Returning the file size

    I was just wondering what C function I can use to return the size of a file. While I'm at it, do any of you guys know where I can get a good book on the C library? Or more generally, a good C book?
  11. Replies
    0
    Views
    1,901

    Undefined Reference

    Without posting the code, I was just wondering if someone could tell me what this error means:

    /usr/classes/cis3072/c307206/lab3/lab3.c:92: undefined reference to `MD5Init

    I am receiving these...
  12. Replies
    1
    Views
    1,382

    Help with strcat

    I am trying to use the strcat function, but I am trying to concatenate numbers and nodes from a struct into the string. I have a struct that looks like this:

    typedef struct node{
    struct node *...
Results 1 to 12 of 12