Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.21 seconds.

  1. Replies
    19
    Views
    342

    Um, obviously you search packet.hpp for namespace...

    Um, obviously you search packet.hpp for namespace and see if the declaration is within a namespace.


    Instead of trying to dive into an open source project, you might want to work through an...
  2. Replies
    19
    Views
    342

    Check the namespaces involved.

    Check the namespaces involved.
  3. Replies
    19
    Views
    342

    Then why did you write this line of code? ...

    Then why did you write this line of code?

    sequence = Sequence ();
    If you don't know what Sequence is, then you don't know what that line of code does.


    No, you should find out, e.g., search...
  4. Replies
    19
    Views
    342

    I don't know. I don't even know what Sequence is...

    I don't know. I don't even know what Sequence is for sure other than it looks like a function because it was used with function-call syntax.

    Basically, to declare something is to describe to the...
  5. Replies
    19
    Views
    342

    What is Sequence?

    What is Sequence?
  6. Replies
    19
    Views
    342

    That's easy: #include "packet.hpp" I'm...

    That's easy: #include "packet.hpp"

    I'm assuming that you're using the common convention of ".hpp" denoting a header file, and it is the very purpose of a header file to contain declarations to be...
  7. Replies
    19
    Views
    342

    Well, then the error message makes perfect sense:...

    Well, then the error message makes perfect sense: Sequence was not declared, just as it says. You may have defined it below this code or in another file, in which case you need a forward declaration...
  8. Replies
    19
    Views
    342

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

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

    What is the exact error message and which line does it refer to?
  10. 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,...
  11. Replies
    1
    Views
    287

    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...
  12. Replies
    3
    Views
    326

    Could this be some kind of precompiled header...

    Could this be some kind of precompiled header issue?
  13. Replies
    4
    Views
    351

    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...
  14. Replies
    4
    Views
    351

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

    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...
  16. 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...
  17. Replies
    4
    Views
    385

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

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

    by laserlight
    Replies
    21
    Views
    962

    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...
  19. Replies
    5
    Views
    573

    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...
  20. Replies
    5
    Views
    573

    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...
  21. As conjectured in your other topic: Is this...

    As conjectured in your other topic:

    Is this true?
  22. Replies
    18
    Views
    1,532

    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...
  23. Replies
    18
    Views
    1,532

    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...
  24. Replies
    18
    Views
    1,532

    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...
  25. Replies
    18
    Views
    1,532

    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...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4