Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.14 seconds.

  1. Replies
    1
    Views
    9

    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
  2. 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...
  3. Replies
    9
    Views
    212

    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...
  4. Replies
    9
    Views
    212

    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...
  5. Replies
    9
    Views
    212

    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.
  6. Replies
    3
    Views
    207

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

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

    I see. So what exactly is the help that you need?
  8. Replies
    23
    Views
    460

    What this error message is telling you is that...

    What this error message is telling you is that you have two rectangle objects, and you tried to compare them with the >= operator. Now, conceptually you are trying to compare to see if one rectangle...
  9. 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...
  10. Replies
    23
    Views
    460

    That doesn't make sense. You can use qsort to...

    That doesn't make sense. You can use qsort to sort rectangles by area even when you're only storing the height and width: the disadvantage is that you have to keep computing the areas whenever you...
  11. 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,...
  12. 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...
  13. Replies
    3
    Views
    159

    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>
    ...
  14. Replies
    2
    Views
    170

    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...
  15. Replies
    7
    Views
    186

    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...
  16. Replies
    7
    Views
    186

    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?
  17. Replies
    7
    Views
    186

    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...
  18. Replies
    9
    Views
    164

    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...
  19. Replies
    9
    Views
    164

    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...
  20. Replies
    23
    Views
    460

    Okay, let's examine why this is wrong: Your...

    Okay, let's examine why this is wrong:

    Your function should only have one return statement for every possible path that control could take through it. So for example, if you have an if statement,...
  21. Replies
    9
    Views
    164

    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...
  22. Replies
    23
    Views
    460

    What exactly did you do?

    What exactly did you do?
  23. Replies
    9
    Views
    164

    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];
    ...
  24. 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...
  25. What you're basically trying to do is to replace...

    What you're basically trying to do is to replace the user input with something generated by the computer. So, since the user input consists of a number representing a square selection, you just need...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4