Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.30 seconds.

  1. Replies
    2
    Views
    109

    I'm guessing that since this is a job rather than...

    I'm guessing that since this is a job rather than school, you already have a sufficiently strong foundational programming background to pass the interview for this internship/junior role, but the...
  2. Replies
    8
    Views
    130

    Does that actually work? It looks like the pos1...

    Does that actually work? It looks like the pos1 and pos2 business is just to count the number of characters in the file, then you subtract from pos2 each time... but that doesn't make sense to me....
  3. Replies
    19
    Views
    426

    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...
  4. Replies
    19
    Views
    426

    Check the namespaces involved.

    Check the namespaces involved.
  5. Replies
    19
    Views
    426

    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...
  6. Replies
    19
    Views
    426

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

    What is Sequence?

    What is Sequence?
  8. Replies
    19
    Views
    426

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

    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...
  10. Replies
    19
    Views
    426

    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...
  11. Replies
    19
    Views
    426

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

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

    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...
  14. Replies
    3
    Views
    344

    Could this be some kind of precompiled header...

    Could this be some kind of precompiled header issue?
  15. Replies
    4
    Views
    357

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

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

    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...
  18. 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...
  19. Replies
    4
    Views
    392

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

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

    by laserlight
    Replies
    21
    Views
    978

    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...
  21. Replies
    5
    Views
    589

    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...
  22. Replies
    5
    Views
    589

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

    As conjectured in your other topic:

    Is this true?
  24. Replies
    18
    Views
    1,571

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

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