Search:

Type: Posts; User: jeanluca

Page 1 of 3 1 2 3

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    4,364

    thats what I will do, a producer and consumer...

    thats what I will do, a producer and consumer thread!

    thnx a lot
    Luca
  2. Replies
    7
    Views
    4,364

    So you would suggest to create 1 thread which...

    So you would suggest to create 1 thread which reads all files, and not a thread for each file, right ?
  3. Replies
    7
    Views
    4,364

    well, I need to process all files simultaneously...

    well, I need to process all files simultaneously (I need to combine the data), so I cannot do this with multiple instances!

    But if IO isn't blocking the processing thread, this will be the best...
  4. Replies
    7
    Views
    4,364

    Should I use threads to do the file io

    Hi All

    I'm writing a tool which processes data. The amount of data can be huge, also multiple files.
    So what I need to do is the following: 1) read from all files, for example, 1024 samples, 2)...
  5. thnx a lot!!!

    thnx a lot!!!
  6. print to console or /dev/null for debugging info

    Hi All

    I need a solution for my debug functionallity. Depending on the variable DEBUG, messages should or shouldn't appear in the console.

    Can this be done with fprintf ? If DEBUG is 0 it...
  7. Replies
    2
    Views
    1,732

    I see, so it has todo with header files including...

    I see, so it has todo with header files including each other

    cheers
  8. Replies
    2
    Views
    1,732

    multiple include doesn't give compile error

    Hi All

    I have a main file (main.c) which includes show.h and show1.h
    But show1.c also includes show.h. show.h looks like


    void init() ;
    void show() ;
    void set(int x) ;
    int *get() ;
  9. Replies
    14
    Views
    3,186

    fortran 77 or 90 ? :) good point, I'll skip...

    fortran 77 or 90 ? :)

    good point, I'll skip the casts!
  10. Replies
    14
    Views
    3,186

    thnx Well my code is pure C, but I guess it...

    thnx

    Well my code is pure C, but I guess it might be useful when it compiles with a c++ compiler too!
  11. Replies
    14
    Views
    3,186

    so, its a 'best practice' to always do the...

    so, its a 'best practice' to always do the conversion youself!?
  12. Replies
    14
    Views
    3,186

    bar = (struct *FOO)malloc(sizeof(FOO)) ; ...

    bar = (struct *FOO)malloc(sizeof(FOO)) ;
    doesn't compile, but I found out it should be:

    bar = (struct FOO*)malloc(sizeof(FOO)) ;
  13. Replies
    14
    Views
    3,186

    malloc returns a void pointer, so I thought you...

    malloc returns a void pointer, so I thought you should cast it, like

    char *str ;
    str = (char*) malloc( 100 * sizeof(char) ) ;
    I assume this is optional ? Just curieus, can this be done...
  14. Replies
    14
    Views
    3,186

    ok, I tried the following to fix it: bar =...

    ok, I tried the following to fix it:


    bar = (struct *FOO)malloc(sizeof(FOO)) ;


    Doesn't compile :(
  15. Replies
    14
    Views
    3,186

    struct pointer -> Bus Error

    Hi All

    I've written a test program to experiment with structs a little bit:


    #include <stdio.h>

    struct FOO {
    int id ;
    } foo, *bar;
  16. check, thnx

    check, thnx
  17. Ok, make sense!, but then I have one last...

    Ok, make sense!, but then I have one last question, if I have a header file like


    void check_config_file(char *file) ;
    int load_config_file(char *filename) ;
    struct CONFIG
    {
    int *var1...
  18. multiple include of header file gives compile errors

    Hi All

    I need some guidance with header files because I can't solve the following compile error:


    make
    gcc -I./lib -c file1.c -o file1.o
    gcc -I./lib -c file2.c -o file2.o
    gcc -I./lib ...
  19. Replies
    11
    Views
    20,684

    I see the 3 running perfectly right now, so the...

    I see the 3 running perfectly right now, so the bus error was indeed something else at that time!
  20. Replies
    11
    Views
    20,684

    Thats a good thing (I thought I had Bus errors...

    Thats a good thing (I thought I had Bus errors with the other 2)

    thnx!!
  21. Replies
    11
    Views
    20,684

    it works for me too :) But, can someone...

    it works for me too :)

    But, can someone explain the differences between:



    printf( "value is %d\n", *(int*)getSomething(input) ) ;

    ,
  22. Replies
    11
    Views
    20,684

    I need the value

    I need the value
  23. Replies
    11
    Views
    20,684

    printf a int/float pointer

    Hi

    I have this function which returns a void pointer:



    printf( "value is %d\n", (int*)getSomething(input) ) ;
    printf( "value is %f\n", (float*)getSomething(input1) ) ;

    This doesn't work...
  24. Replies
    6
    Views
    1,817

    Thnx for all the help! I'm using gdb and...

    Thnx for all the help!
    I'm using gdb and valgrind now (which I didn't before) and I'm making progress!!
    For example, I noticed that the function 'substring' wasn't correct at all :)
    But I think...
  25. Replies
    6
    Views
    1,817

    Here is the output: window_shift --> 12 en...

    Here is the output:


    window_shift --> 12 en 13
    119 105 110 100 111 119 95 115 104 105 102 116 7 | window_shift
    119 105 110 100 111 119 95 115 104 105 102 116 | window_shift

    What does...
Results 1 to 25 of 72
Page 1 of 3 1 2 3