Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.13 seconds.

  1. Replies
    1
    Views
    89

    Your for loop increment is wrong. It should be i++

    Your for loop increment is wrong. It should be i++
  2. Replies
    1
    Views
    76

    What exactly is ? I'd guess that...

    What exactly is <sys/player.h>? I'd guess that you may have installed a different version of your header file as a system header under a sys folder, and hence your new header file (Header.h) has a...
  3. A direct answer to your question is extremely...

    A direct answer to your question is extremely simple: given a pointer p, you can increment the pointer in any one of at least four ways:

    ++p;
    p++;
    p += 1;
    p = p + 1;

    But it doesn't sound...
  4. You really need to stop this bad habit of posting...

    You really need to stop this bad habit of posting code with no context, or in this case, taking it out of context by omitting "in a 2D char array". If you did want to provide context, then you should...
  5. You practically answered your own question: ...

    You practically answered your own question:

    func(resp->info_entry);
  6. Replies
    1
    Views
    173

    Yes, but it would be somewhat easier if you made...

    Yes, but it would be somewhat easier if you made use of existing material that explains them: cppreference.com entry list on Input/output manipulators
  7. Why don't you just change the parameter to be a...

    Why don't you just change the parameter to be a ProductType pointer? If you cannot do this because say, this function is intended to be passed as some kind of generic callback, then yes, casting to...
  8. Replies
    14
    Views
    383

    Ah. From what I understand though, this idea of a...

    Ah. From what I understand though, this idea of a "rounds" or "cost" or "work factor" parameter goes back to the key stretching idea applied to make using the old cryptographic hashes stronger when...
  9. Replies
    14
    Views
    383

    No, what I'm saying is that password hashing...

    No, what I'm saying is that password hashing algorithms want to be slow and make parallelisation difficult. That is, if you're aiming to provide a password hashing algorithm, the competitors will not...
  10. Replies
    14
    Views
    383

    This sounds more like a cryptographic hash...

    This sounds more like a cryptographic hash primitive rather than specifically a password hashing algorithm. The latter tends to have "slow" and "frustrate parallelisation" as additional goals.
  11. Replies
    3
    Views
    291

    You should read the other things Salem wrote, not...

    You should read the other things Salem wrote, not just the code.
  12. I see. So what exactly is the help that you need?

    I see. So what exactly is the help that you need?
  13. Try writing out the steps on paper and then...

    Try writing out the steps on paper and then "executing" your algorithm on paper.

    It looks like you might be getting confused between whether you want this to be a player versus player or player...
  14. Recall that macro substitution is a fairly simple...

    Recall that macro substitution is a fairly simple replacement mechanism. So if you have a function-style macro like this:

    #define ADD(x, y) ((x) + (y))
    and you use it like this:

    printf("%d\n,...
  15. No, that's just a function-style macro. The "if...

    No, that's just a function-style macro. The "if statement" is the #if macro, but of course it is a preprocessor directive, not an if statement.

    The NRFX_CHECK macro might be for flexibility so...
  16. Replies
    3
    Views
    183

    I would suggest that the first thing to do is to...

    I would suggest that the first thing to do is to format your code properly, especially where indentation is concerned. For example:

    #include <stdio.h>
    #include <stdlib.h>
    #include <time.h>
    ...
  17. Replies
    2
    Views
    187

    bucket_straw2_choose does not appear in the code....

    bucket_straw2_choose does not appear in the code. Did you mean the bucket_choose function? That one is declared with a return type of int, so it returns an int. If you're confused by the static...
  18. Replies
    7
    Views
    210

    Let's see your code with the "one-by-one (by...

    Let's see your code with the "one-by-one (by iterating to it)" version.

    EDIT:
    Well, I decided to adapt and combine your code in post #3 into your code in post #1:

    #include <stdio.h>

    #define...
  19. Replies
    7
    Views
    210

    Yeah, that's exactly what I guessed. Why don't...

    Yeah, that's exactly what I guessed. Why don't you do the same thing in your code in post #1 as you did in your code in post #3?
  20. Replies
    7
    Views
    210

    What is the code that you used for this? Perhaps...

    What is the code that you used for this? Perhaps you did something different, e.g., you used XOR character by character rather than trying to use it with the entire array at once.

    Also, printing...
  21. Replies
    9
    Views
    178

    Yeah, I'm afraid that you're compiling as C++,...

    Yeah, I'm afraid that you're compiling as C++, not C. You need to figure out how to change your setup to compile as C, otherwise you'll find that you can write valid C code that turns out to be...
  22. Replies
    9
    Views
    178

    Post the smallest and simplest program that...

    Post the smallest and simplest program that demonstrates the compile error.

    Alternatively, you can rename class to mob_class. If that fixes your compile errors, then you're probably accidentally...
  23. Replies
    9
    Views
    178

    On a hunch: are you compiling with a C compiler...

    On a hunch: are you compiling with a C compiler or a C++ compiler? The .c file extension makes me think that it should default to C even if your compiler toolchain supports both C and C++, but I...
  24. Replies
    9
    Views
    178

    You have a rough idea, but not quite. First you...

    You have a rough idea, but not quite. First you need to define a struct type:

    struct mob
    {
    char name[NAME_MAXLEN + 1];
    char sex[SEX_MAXLEN + 1];
    char race[RACE_MAXLEN + 1];
    ...
  25. There's this trick for "commenting out" large...

    There's this trick for "commenting out" large swathes of code when testing something:

    #if 0
    some code...
    #endif
    This NRFX_CHECK function-style macro does the same thing. If NRFX_SAADC_ENABLED...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4