Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.24 seconds.

  1. I would advise you to install it on the mobile...

    I would advise you to install it on the mobile device that you normally carry so that you can refer to it when you want to use computing resources that you do not trust or trust but have no...
  2. Use a password manager. Typically, you can tweak...

    Use a password manager. Typically, you can tweak your password manager's random password generation rules to suit whatever reasonable password strength rules might be imposed.

    If you are the one...
  3. Replies
    7
    Views
    312

    Generally, the solution is to avoid writing such...

    Generally, the solution is to avoid writing such code in the first place. The reason is that this:

    int a = 1;2;3;
    is the same as this except for formatting:

    int a = 1;
    2;
    3;
    That is, you...
  4. Generally, when you start numbering variables...

    Generally, when you start numbering variables like that, it becomes worthwhile to ask if arrays should be used instead. If arrays are used, then a loop becomes a natural option.
  5. I'm a bit amused because one of the rhetorical...

    I'm a bit amused because one of the rhetorical questions Stroustrup asks in his answer to the FAQ Why use exceptions? is "Imagine that we did not have exceptions, how would you deal with an error...
  6. Replies
    2
    Views
    989

    You're looking at the terminal tab, so it has...

    You're looking at the terminal tab, so it has more than just your output. You could try switching to the output tab instead, or add a \n to the end of your hello world output to make it clearer.
  7. Thread: Hello!

    by laserlight
    Replies
    1
    Views
    21,780

    Hello!

    Hello!
  8. The idea is to invoke the base class constructor...

    The idea is to invoke the base class constructor that takes a HINSTANCE, passing hInstance as the argument. If you didn't do that, then the default constructor for the base class would be invoked...
  9. Replies
    3
    Views
    835

    sizeof won't do what you want since commands is a...

    sizeof won't do what you want since commands is a type rather than some kind of aggregate. Since you're explicitly assigning a value in the middle, you cannot use the trick of computing from the...
  10. The easy guess is that you're writing to...

    The easy guess is that you're writing to airfoil_d out of bounds, and airfoil_d happens to be adjacent to blade_d in memory such that this results in overwriting elements of blade_d.

    The general...
  11. Replies
    8
    Views
    1,504

    You need to compile as C++20, or if your compiler...

    You need to compile as C++20, or if your compiler does not support C++20, then you need to upgrade compiler.
  12. Notice that you call gridStr(str) rather than...

    Notice that you call gridStr(str) rather than gridStr(str, key). You should compile at a higher warning level so your compiler will warn you about such mistakes.

    When you compile at a higher...
  13. Suppose that s[i] == '\0'. Then, you want to move...

    Suppose that s[i] == '\0'. Then, you want to move on to the next loop, and start writing at index i as you want to overwrite the null character since you will append a null character at the end of...
  14. Having said that, I realised that you wrote "not...

    Having said that, I realised that you wrote "not all the boxes are mandatory". Does this mean that all the root box names are known in advance? If so, then maybe you're overthinking it: a struct of...
  15. Basically, you want to map root box names to...

    Basically, you want to map root box names to struct objects. As per the hint from Perl's hash variables, one way is to hash these names as strings so that they become indices in some kind of hash...
  16. Replies
    13
    Views
    3,310

    I suggest that you learn to use the standard...

    I suggest that you learn to use the standard library and perhaps other common utility libraries before you go along the path of the obscure. After you learn to use them, learn to implement them.

    I...
  17. Replies
    13
    Views
    3,310

    It sounds like you just want to do something like...

    It sounds like you just want to do something like what strcmp does to produce a yes/no result concerning the question of whether the strings are equal. If so, then it could be as simple as:

    const...
  18. Poll: * looks at votes * The tribe has spoken.

    * looks at votes *

    The tribe has spoken.
  19. Replies
    8
    Views
    1,779

    Your strategy of using char and character...

    Your strategy of using char and character constants in a switch should be absolutely portable for any standard conforming C implementation since the C standard explicitly mandates that those...
  20. The key is to understand why do we return a...

    The key is to understand why do we return a pointer from the ADD function in the first place. The answer to that is that we want to update the head pointer from the caller, and we cannot do that...
  21. Thread: DFS in C

    by laserlight
    Replies
    2
    Views
    2,961

    Perhaps it would be easier if you provided your...

    Perhaps it would be easier if you provided your implementation of the recursive approach too, as well as your test input data that demonstrates the different result.
  22. Replies
    8
    Views
    2,051

    Since you're using MinGW, the issue here might be...

    Since you're using MinGW, the issue here might be that the Visual C runtime is used, or something like that. It is why instead of the standard %lld you may have to use %I64d or something like that to...
  23. Replies
    4
    Views
    1,395

    The typical approach is to provide an opaque...

    The typical approach is to provide an opaque pointer. But this means that all the functions that make up the interface of your library must either accept a pointer parameter or return a pointer that...
  24. Yes. Yes Yes, but that's a...

    Yes.


    Yes


    Yes, but that's a self-referential tautology and hence doesn't really mean anything useful. What you probably meant to say is that you think that the next pointer of the first node...
  25. The OP wrote it right there in post #1: This...

    The OP wrote it right there in post #1:

    This is typically used when you want to have a constant time append operation for the linked list (in addition to constant time prepend).
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4