Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.24 seconds.

  1. Replies
    3
    Views
    80

    As you are probably aware, the error message does...

    As you are probably aware, the error message does not make sense. Are you copying and pasting the error message? I'm assuming that you are, but it is good to check in case you happened to change...
  2. Replies
    3
    Views
    80

    What is the exact error message and which line...

    What is the exact error message and which line does it refer to?
  3. What's stopping you from using better hardware or...

    What's stopping you from using better hardware or say, cloud computing services? What's the expected bottle neck in the code that you intend to write? (e.g., if network latency is going to dominate,...
  4. Replies
    1
    Views
    263

    This doesn't look obfuscated: the variable names...

    This doesn't look obfuscated: the variable names are perhaps a little concise, but that could be okay. The function names look like they have relevant meaning, as does the text to be printed. There...
  5. Replies
    3
    Views
    306

    Could this be some kind of precompiled header...

    Could this be some kind of precompiled header issue?
  6. Replies
    4
    Views
    336

    In that case, I suggest writing two functions....

    In that case, I suggest writing two functions. First:

    void print(const int numbers[], int size)
    This will print the first size number of numbers. Implement and test that this works, then...
  7. Replies
    4
    Views
    336

    I suggest that the function look like this: ...

    I suggest that the function look like this:

    void print_reverse(const int numbers[], int size)
    Here's why:

    print_reverse makes it clear that you're printing the numbers in reverse, not...
  8. Replies
    7
    Views
    453

    I'd say it is a good idea to use them if x or the...

    I'd say it is a good idea to use them if x or the return type of the function is bool or conceptually boolean. If they are supposed to be integers, then there might be the consideration of whether...
  9. That's not usually what "portable" means. ...

    That's not usually what "portable" means.

    Anyway, if you're saying that certain constructs can be problematic when used in C because programmers coming from other programming languages that don't...
  10. Replies
    4
    Views
    373

    So, what is your code, your test input, expected...

    So, what is your code, your test input, expected output, and actual output?
  11. Thread: FIFO Queue

    by laserlight
    Replies
    21
    Views
    939

    The idea is to pass a pointer to a struct Queue...

    The idea is to pass a pointer to a struct Queue object to queueInit so that queueInit can supply the initial values which will then be reflected in the object from the caller. You don't have to use...
  12. Replies
    5
    Views
    542

    This looks pretty problematic: My guess is...

    This looks pretty problematic:

    My guess is that this goes back to my observation that within append you're assigning to an object that has not been constructed. You should look into the use of...
  13. Replies
    5
    Views
    542

    Well, I'd say that it is good that you're...

    Well, I'd say that it is good that you're learning how to write a generic dynamic array class template from scratch, but you might want to do some reading on how to write classes that do resource...
  14. As conjectured in your other topic: Is this...

    As conjectured in your other topic:

    Is this true?
  15. Replies
    18
    Views
    1,449

    The use of void to mean an empty parameter list...

    The use of void to mean an empty parameter list is valid, but unusual in C++ because it has no benefit, whereas in C it can distinguish between an empty parameter list and a declaration of a function...
  16. Replies
    18
    Views
    1,449

    I didn't raise an issue about aghast's code. I...

    I didn't raise an issue about aghast's code. I noted "that this is the C++ programming forum, so you can and should assume C++ by default, not C". Remember, one should use tools that are appropriate...
  17. Replies
    18
    Views
    1,449

    Because it would be additional effort to have to...

    Because it would be additional effort to have to phrase the explanations for and code in C while also targeting C++ (hence if you want to be sure that "it compiles and doesn't introduce problematic...
  18. Replies
    18
    Views
    1,449

    I think so, but I haven't checked with a C++...

    I think so, but I haven't checked with a C++ compiler. However, it is clear from the text and the style of the code that aghast felt the need to assume C while referencing C++ to answer the question...
  19. Replies
    18
    Views
    1,449

    aghast: note that this is the C++ programming...

    aghast: note that this is the C++ programming forum, so you can and should assume C++ by default, not C.
  20. Replies
    8
    Views
    796

    Pardon me, but I thought you wanted to port over...

    Pardon me, but I thought you wanted to port over to C, not C++.

    As for your question: maybe a possible approach in C or C++ would be to return a value, and based on this value the caller decides...
  21. Replies
    5
    Views
    636

    The *nix read and write operate on bytes, so the...

    The *nix read and write operate on bytes, so the bytes could be the bytes of the int value in memory, or they could be the bytes of a string representation of the number; it's up to you.
  22. Replies
    1
    Views
    436

    nRow is converted to unsigned int, so it becomes...

    nRow is converted to unsigned int, so it becomes the largest unsigned int value.
  23. Replies
    11
    Views
    546

    info is normally used to print some info rather...

    info is normally used to print some info rather than to actually do something though. Wouldn't it be simpler to just write say:

    all:
    $(pull_mak)

    EDIT:
    Although I guess naming the target...
  24. Replies
    11
    Views
    546

    Shouldn't lines 5 and 6 go in a rule or whatever...

    Shouldn't lines 5 and 6 go in a rule or whatever they call it?

    EDIT:
    Oh, looks like line 5 doesn't have to go in a rule, but it makes sense to keep it with line 6.
  25. Replies
    11
    Views
    546

    If I remember correctly, a common reason for that...

    If I remember correctly, a common reason for that error is the makefile being indented by spaces instead of tabs.
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4