Search:

Type: Posts; User: Mortissus

Page 1 of 7 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    3
    Views
    1,579

    I am asking this because I never paid attention...

    I am asking this because I never paid attention to this paramter. But recently I saw that a developer in my team changed memset call in a legacy code that I am working from:

    memset(buff, 0xFF,...
  2. Replies
    3
    Views
    1,579

    Question about memset

    According to link, memset accepts an int for the value to be set. Why an int, if memset set each byte in the buffer?

    I can only imagine that memcpy tries to optimize by copying 4 bytes at a time....
  3. Replies
    4
    Views
    1,503

    I tried to create a code snippet using difftime,...

    I tried to create a code snippet using difftime, but it didn't work. First I had to subtract 70 from the resulting years, since gmtime starts from 00:00:00 on January 1, 1970. But the struct tm...
  4. Replies
    12
    Views
    15,247

    Thanks! I will start my reading right away!

    Thanks! I will start my reading right away!
  5. Replies
    12
    Views
    15,247

    Any good reading of the state of the art (kernel...

    Any good reading of the state of the art (kernel 2.6) on this subject?
    I would like to know a little more about the details.

    Thanks ;D
  6. Replies
    7
    Views
    1,559

    So obvious... I am a little rusted. Thanks ;D

    So obvious... I am a little rusted.

    Thanks ;D
  7. Replies
    7
    Views
    1,559

    Why?

    Why?
  8. Replies
    10
    Views
    6,676

    What is the difference between them? The only...

    What is the difference between them? The only thing I spot is the foo() being called inside do_foo(), which we agreed is an error.
  9. Replies
    2
    Views
    1,981

    You must see a file as a storage of bytes. You...

    You must see a file as a storage of bytes. You can read and write anything from/into it. You could write an integer, for example, in this case, the file is binary.

    It was a short answer, because...
  10. Replies
    10
    Views
    6,676

    Isn't because do_foo call foo that calls do_foo...

    Isn't because do_foo call foo that calls do_foo again (and so forever)??? ;)
    Did you run this code?
  11. Replies
    4
    Views
    3,537

    It worked!!! Thanks.

    It worked!!!
    Thanks.
  12. Replies
    4
    Views
    3,537

    Thanks so much, I will try it right now. I have...

    Thanks so much, I will try it right now. I have searched for many days for a solution, but I didn't search in the most obvious place: the Oracle manual (I feel so amateur). You have saved me many...
  13. Replies
    4
    Views
    3,537

    Oracle cursor in ODBC

    Is there a way to use Oracle cursors with ODBC? I must access an Oracle Database and use its stored procedure, that returns the result in a cursor. I don't know any type in ODBC that matches an...
  14. Replies
    9
    Views
    2,571

    The >> is text oriented, i.e., it reads until it...

    The >> is text oriented, i.e., it reads until it finds a space or a newline character. Look for the read function, it might be handy.
  15. Replies
    2
    Views
    2,079

    Hi, I have made a test myself and would like to...

    Hi, I have made a test myself and would like to share the results:


    // test.cpp
    #include <pthread.h>
    #include <stdio.h>

    #include "my_lib.h"

    int main()
  16. Replies
    2
    Views
    2,079

    global variable at dynamic library

    Hello! I have a couple of functions that MUST share a single variable. These functions will be compiled into a dynamic library (.so) and this library will be accessed by multiple threads. Is this...
  17. Replies
    3
    Views
    1,161

    Thanks so much! :D

    Thanks so much! :D
  18. Replies
    3
    Views
    1,161

    Changing symbol's linkage

    Is there a way to "overload" the symbols of a binary? For example, I compiled my application and sent it to user. He is running it, but he discovers that the application randomly crashes. I suspect...
  19. Well, if you need to impose a specific option...

    Well, if you need to impose a specific option order, it doesn't make much sense to use options. I believe that the idea behind the options is the possibility to specify them (or not) in any order.
  20. ¬¬ You can solve this problem with simple...

    ¬¬

    You can solve this problem with simple programming. Create variables for each information you need to write. Perform the while-switch to read the options and assign the options to the...
  21. Replies
    3
    Views
    2,766

    Thanks for the reply :) The problem isn't have...

    Thanks for the reply :)
    The problem isn't have the id inside each structure. The problem is that I want a generic pack function (void* parameter), but I want to be able to discover in the receiver,...
  22. Google: man getopt_long...

    Google: man getopt_long
  23. int getopt(int argc, char * const argv[], const...

    int getopt(int argc, char * const argv[], const char *optstring);

    It works on Linux and gcc on Windows.

    Edit: I am pasting an example from the man page itself:


    #include <stdio.h> /*...
  24. Replies
    3
    Views
    2,766

    Sending structures through the network

    Hi, I need to send different structures through the network, and be able to recover them at the other side. I do not know how to give each structure an unique identifier, so I can discover what is...
  25. Replies
    13
    Views
    2,747

    Yes.

    Yes.
Results 1 to 25 of 152
Page 1 of 7 1 2 3 4