Oh, and I am also using calloc to allocate the array size before I read in from the file.
Type: Posts; User: mmondok
Oh, and I am also using calloc to allocate the array size before I read in from the 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 =...
Thank you! Next time I will check my code a little closer before posting.
Here is my code:
#include <string.h>
#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/socket.h>
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...
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");
}
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...
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...
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...
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?
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...
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 *...