Could I do something like
char name[15]; //string name has a max of 15 characters
int i, n, k;
char buffer[128];
i = read (fd, buffer, 128);
Type: Posts; User: busdude
Could I do something like
char name[15]; //string name has a max of 15 characters
int i, n, k;
char buffer[128];
i = read (fd, buffer, 128);
I have two programs, one is supposed to write three strings to the other who reads them and saves them in three variables, but I don't know how to do this right.
fd = open("named_pipe",...
so what kind of loop should I try, an infinite one like for (;;); or some sort of while loop?
void got_int(int sig_num) //SIGINT handler function to add to the database
{
char name[20]; //items for the database
int number;
char address[30];
...
I don't think the signal handle functions are relevant to this problem, but anyway I had the 're-install' in there but it was the first line of the function, I changed it to the last line, and I...
My program has two child processes and a parent. Every time the first child program gets a SIGINT signal, it's supposed to pipe the message "Record created" to it's parent, and then the parent is...
ok would i then be able to pass this word into a function that has char* in one of its parameters?
The file reading appears to be functional now but I'm getting a segmentation fault when I try to...
the thing is, i dont know the size of the file, how many words will be in it, could be 3, could be 10000
i just hardcoded to simplify, but its supposed to be decided by user
so should i declare...
char is declared at top as
char* word = NULL;
also, i have tried an if statement to check that the file isnt null and indeed its not.
i have a int number which is supposed to count the number of words in a file, but its not augmenting correctly, stays at 0, dont know why i need help
int number = 0;
fp = fopen("wordlist",...
I need methods or some say to check
a) if two strings of equal length have all but one character in common, that is in the same position in both words.
example, pale and pane, or cat and can....