Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.10 seconds.

  1. One way to approach this is to do a direct...

    One way to approach this is to do a direct debugging method: run your program using a debugger, place breakpoints and check that the values of the variables are what you expect them to be at those...
  2. Uh, I hate to say this, but it looks like you're...

    Uh, I hate to say this, but it looks like you're posting irrelevant Wikipedia articles to bluff your way through having made an incorrect statement in post #3 that one of the articles you shared...
  3. Replies
    1
    Views
    33

    Create your own MD5 collisions

    A colleague of mine recently posted a link to this 2015 article on Create your own MD5 collisions and while this is hardly news, and so I haven't bothered to see if the instructions still work, I...
  4. Replies
    3
    Views
    65

    I already told them to you. What kind of example...

    I already told them to you. What kind of example are you looking for?
  5. Structure: what are you trying to illustrate?

    Structure: what are you trying to illustrate?
  6. That's mathematically incorrect though (i.e.,...

    That's mathematically incorrect though (i.e., 0.999... repeating is in fact mathematically equal to 1), so Salem's explanation is better. Maybe you wanted to use truncation of 1/3 in decimal to...
  7. Replies
    3
    Views
    65

    In most contexts, an array is converted to a...

    In most contexts, an array is converted to a pointer to its first element. The notable exceptions being when the array is an operand of the address-of operator & and the sizeof operator.
  8. Replies
    3
    Views
    155

    Chuck the various constants into a few (static)...

    Chuck the various constants into a few (static) arrays. Then instead of huge if-else chains, you just select the constant by accessing the relevant array by index, after which you can call...
  9. Replies
    4
    Views
    190

    Instead of returning a multiple, you could print...

    Instead of returning a multiple, you could print it in the loop body.

    You might also consider if skipping numbers by the multiple might be a more efficient approach.
  10. You are mistaken:

    You are mistaken:
  11. I suggest reading Eric Raymond's article on The...

    I suggest reading Eric Raymond's article on The Lost Art of Structure Packing. The section on "Structure alignment and padding" has a similiar example with explanation why there might be trailing...
  12. Replies
    2
    Views
    178

    Just in case, let's clarify: you passed -O3...

    Just in case, let's clarify: you passed -O3 rather than -o3 as an option, right?
  13. Replies
    11
    Views
    574

    I'm not sure what to make of this: either you...

    I'm not sure what to make of this: either you know your cryptography and are just trolling (with a second account), or you don't know your cryptography and so have no clue as to why "considering...
  14. Replies
    11
    Views
    574

    The term "autokey cipher" refers to a particular...

    The term "autokey cipher" refers to a particular kind of encryption algorithm.


    A quick glance shows that you have implemented a kind of substitution cipher of the "XOR cipher" variety, although...
  15. You're looking at declarations of a pointer to a...

    You're looking at declarations of a pointer to a pointer, of an array of pointers, and of a pointer to an array, respectively.

    As for how to dynamically allocate memory for them: first, you need...
  16. By using another parameter to determine which...

    By using another parameter to determine which functionality to invoke. But that's irrelevant until you have implemented them, so don't ask me for an example until you show us your implementation of...
  17. Looking at your past posts, you mentioned trying...

    Looking at your past posts, you mentioned trying to implement an autokey cipher. Going by the Wikipedia article, this involves the use of a "primer" that is prepended to the plaintext to generate the...
  18. That's a good attempt, but instead of using...

    That's a good attempt, but instead of using new[], you should use a std::vector. For example:

    #include <iostream>
    #include <vector>

    using namespace std;

    class Planet {
    public:
    ...
  19. Replies
    1
    Views
    204

    Yes, but you probably want && instead of bitwise &

    Yes, but you probably want && instead of bitwise &
  20. These warnings are telling you that you passed a...

    These warnings are telling you that you passed a string literal as an argument where the parameter is a char* rather than const char*. The reason why this is a red flag is that what a char* parameter...
  21. Replies
    5
    Views
    252

    At a glance, one issue is that you are not...

    At a glance, one issue is that you are not resetting intTotal to 0.

    Since all these tasks are separate, it would be best if you wrote a self-contained function for each of them.

    By the way,...
  22. Please do your own homework. You're free to come...

    Please do your own homework. You're free to come here to ask questions if you're stuck, but not to cheat by getting other people to do your homework for you.
  23. Replies
    10
    Views
    395

    Salem already shared the "secret" with you in the...

    Salem already shared the "secret" with you in the previous post:

    (Of course, where appropriate you can replace fgets with another function that reads a line, e.g., POSIX getline)
  24. Replies
    1
    Views
    175

    You're sorting strings, so it would be most (or...

    You're sorting strings, so it would be most (or least) significant character or byte rather than bit.
  25. That error doesn't make sense in C since...

    That error doesn't make sense in C since bucket_entry and bucket are typedefs for struct types, and hence object types, and there is always a valid conversion from void* to a pointer to object type....
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4