Search:

Type: Posts; User: frank1

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    4,924

    Hi Salem, I'm using WNOHANG because I want...

    Hi Salem,

    I'm using WNOHANG because I want the parent process to go on with the rest of the code without waiting the child process to finish it job

    My idea was to ensure that parent is waiting...
  2. Replies
    3
    Views
    4,924

    Not sure why waitpid() isn't working

    Hello,

    I'm trying to create a child process and waitpid() on a parent process that's running in background. But when I check the process list, child process is 'defunct':




    [...]
    ...
  3. Replies
    2
    Views
    5,853

    Write/Read tree nodes into a binary file

    Hello everyone,

    I have a binary tree, and I want to store all information its leaves stores into a binary file and then read it.

    What I tried:

    A function that reads the tree, and whenever it...
  4. Replies
    2
    Views
    636

    String as parameter not working properly

    Hello guys, I want to alter a string inside a function, but it is not working.

    Here is the function:


    #include <stdio.h>

    void test (char *ch){
    ch[0] = 0;
    ch[1] = 1;
  5. Hello anduril462...

    Hello anduril462, like I said, I don't know and I can't use malloc...

    thanks for answering anyway
  6. Hey oogabooga... No, I don't know the maximium...

    Hey oogabooga...

    No, I don't know the maximium number of records, if I knew I could make a for and solve my problem :/
  7. Bubblesort with unknown size struct read from a bin file

    Hello folks, can you help me please?

    I have a binary file, and I want to pass these infos to a TXT ordered file.

    I can pass the data without problems if I don' try to order: I created a vector...
  8. Well, you can use the command "for" to test the...

    Well, you can use the command "for" to test the five numbers. but if you want to go one by one, you just need to write a printf("%d", a);, and then u check next number, and if he is even, you printf...
  9. Yeah, it worked! I was dealing so much with...

    Yeah, it worked!

    I was dealing so much with binary files, that I forgot that to read/write on txt files it had a different syntax xD

    Thanks oogabooga, whiteflags and laserlight :D
  10. But... if I'm reading like fread(&myStruct,...

    But... if I'm reading like fread(&myStruct, sizeof(typeMyStruct), 1, fp) I'm already converting the data to a struct, and then I try to fwrite this data from the struct...


    while(fread(&myStruct,...
  11. but.... what could I do then? :o What could I...

    but.... what could I do then? :o

    What could I do to create a text readable form file if I have already read a bin file?

    I have a file.bin, and I can read it on the terminal, but if I try to put...
  12. "Invalid chars", when I try to create a text file

    Hello guys, how are you?

    I'm trying to generate a text file using the commands fread and fwrite, but when I open the text file that I'm generating it has a lot of weird letters, and a warning:...
Results 1 to 12 of 12