Search:

Type: Posts; User: Mole42

Page 1 of 2 1 2

Search: Search took 0.01 seconds.

  1. Replies
    7
    Views
    4,319

    When in doubt, consult the documentation: ...

    When in doubt, consult the documentation:

    ntohl Function (Windows)
  2. Thread: Remote login

    by Mole42
    Replies
    3
    Views
    3,126

    SSH isn't a text-based system, it's an encrypted...

    SSH isn't a text-based system, it's an encrypted data stream. What you are seeing is the welcome message.
  3. Thread: Macro question

    by Mole42
    Replies
    4
    Views
    1,169

    I tried that, I get "Undefined identifier:...

    I tried that, I get

    "Undefined identifier: XXX_id_YYY"

    If I change:

    #define getXXX(id) XXX_##id##_YYY

    to:
  4. Thread: Macro question

    by Mole42
    Replies
    4
    Views
    1,169

    Macro question

    Code:

    #define XXX_A0_YYY "foo"
    #define XXX_A1_YYY "bar"
    #define getXXX(id) XXX_##id##_YYY

    The idea is that getXXX(A0) expands to XXX_A0_YYY and thus the result of "cout << getXXX(0)" is...
  5. Thread: timeSetEvent

    by Mole42
    Replies
    3
    Views
    4,220

    Many thanks novacain, you answered the question...

    Many thanks novacain, you answered the question brilliantly, much better than just quoting the msdn to me which I already read before posting (and stated in my first post).

    This board should have...
  6. Thread: timeSetEvent

    by Mole42
    Replies
    3
    Views
    4,220

    timeSetEvent

    When using timeSetEvent with a callback function, how does the callback function actually get called? If my app is busy in another function will that function be interrupted to run the timer...
  7. Replies
    4
    Views
    3,753

    I did think of it for hiding internal functions,...

    I did think of it for hiding internal functions, but simply hiding the prototype by making it only available to the functions that need it seemed like a half-way solution, and the name still has to...
  8. Replies
    4
    Views
    3,753

    The point of local function prototypes?

    As in:



    void foo (void)
    {
    void bar(void);

    bar();
    }
  9. Replies
    15
    Views
    3,840

    I know this seems overkill by a lot of people for...

    I know this seems overkill by a lot of people for single person simple projects, but my code always goes along the following lines:


    think what I need to do, write that down, on paper, away from...
  10. Replies
    5
    Views
    1,794

    I can detect the fact the cursor is inside a...

    I can detect the fact the cursor is inside a function by looking for a closing bracket followed immediately by an opening brace in the token list. Assuming I'm correct in thinking that function...
  11. Replies
    5
    Views
    1,794

    Accurately detecting function calls

    I have a small problem in a little project I'm doing that attempts to accurately detect function calls (not definitions) in an editor window. I only have access to the lines of text in the editor...
  12. Replies
    8
    Views
    4,597

    It's also "theoretically" possible that you can...

    It's also "theoretically" possible that you can include a C compiler in your code to parse the lines and assign the values directly to memory locations, but only insane people would do that for such...
  13. Replies
    15
    Views
    4,392

    Using labels to find the start and end address of...

    Using labels to find the start and end address of a function is very bad practice, and is not compatible with all compilers and OSs. For example, what happens if another compiler decides that part of...
  14. man scandir /* print files in current...

    man scandir



    /* print files in current directory in reverse order */
    #include <dirent.h>
    main(){
    struct dirent **namelist;
    int n;
    n = scandir(".", &namelist, 0, alphasort);
  15. Replies
    3
    Views
    1,846

    That depends, what implementation are you using...

    That depends, what implementation are you using to store that number? There's more than one way to store a fractional number.
  16. Replies
    11
    Views
    2,628

    So, you are duplicating an entire class ...

    So, you are duplicating an entire class (including all the functions and data) for every time you instantiate a class, so you can get the address of a function, knowing that each function belonging...
  17. Replies
    6
    Views
    1,678

    Is there a reason your not using MFC? It was...

    Is there a reason your not using MFC? It was created to make life easier (and handles all this stuff for you), rather than the complex method which you seem to be using.
  18. Replies
    16
    Views
    4,740

    One workaround would be to add something like...

    One workaround would be to add something like "for(;;);" to the start of your program, execute it from a command prompt, and then once the program it running, attach your debugger to the running...
  19. Replies
    10
    Views
    14,519

    Have you tried: printf("Square root of 100 is...

    Have you tried:

    printf("Square root of 100 is equals to: %2.0f", sqrt(x));

    ?
  20. Replies
    17
    Views
    5,633

    time() will give you the current time in seconds,...

    time() will give you the current time in seconds, so if you call it more than once, you can calculate the time since the first call, and show an error box when it's 5 seconds or more.
  21. Replies
    18
    Views
    13,423

    So you need a loop over the entire string (for,...

    So you need a loop over the entire string (for, strlen), and you need a flag to detect when you have encountered white space and when you have not (fWhitespaceDetect). You can then capatilize the...
  22. There are plenty of memory debuggers that will...

    There are plenty of memory debuggers that will alert you at run time if you attempt to access a variable which you have already freed. They work best when they are part of the compile-time chain (so...
  23. Replies
    13
    Views
    23,874

    Simple usb device coupled with example usb driver...

    Simple usb device coupled with example usb driver code.

    I'd say go for it, if your OS is Linux of course.
  24. Replies
    13
    Views
    23,874

    How are you planning on doing that? I'm going to...

    How are you planning on doing that? I'm going to assume you don't know embedded c programming that well, so you'll most likely be using a usb development board. In which case, drivers will be written...
  25. Replies
    4
    Views
    1,378

    Corrected, that was my intention.

    Corrected, that was my intention.
Results 1 to 25 of 26
Page 1 of 2 1 2