Search:

Type: Posts; User: busdude

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    9,095

    Could I do something like char...

    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);
  2. Replies
    5
    Views
    9,095

    Reading strings from a named pipe

    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",...
  3. Replies
    7
    Views
    1,779

    so what kind of loop should I try, an infinite...

    so what kind of loop should I try, an infinite one like for (;;); or some sort of while loop?
  4. Replies
    7
    Views
    1,779

    void got_int(int sig_num) //SIGINT handler...

    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];

    ...
  5. Replies
    7
    Views
    1,779

    I don't think the signal handle functions are...

    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...
  6. Replies
    7
    Views
    1,779

    Need help with piping and signals

    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...
  7. ok would i then be able to pass this word into a...

    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...
  8. the thing is, i dont know the size of the file,...

    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...
  9. char is declared at top as char* word = NULL;...

    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.
  10. need help FAST, counting words in a file with fscanf

    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",...
  11. Replies
    2
    Views
    1,753

    need help comparing strings

    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....
Results 1 to 11 of 11