Search:

Type: Posts; User: laserlight

Page 1 of 20 1 2 3 4

Search: Search took 0.19 seconds.

  1. Replies
    14
    Views
    451

    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...
  2. Replies
    14
    Views
    451

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

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

    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...
  5. Replies
    14
    Views
    451

    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.
  6. Replies
    8
    Views
    348

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

    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.
  8. Replies
    1
    Views
    273

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

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

    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...
  10. Replies
    11
    Views
    292

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

    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.
  12. Replies
    27
    Views
    1,081

    You don't have to use Code Blocks if you're...

    You don't have to use Code Blocks if you're having trouble getting ot installed; just use something else of your choice that's updated and works with gcc or whatever compiler you choose.
  13. Replies
    7
    Views
    657

    RCC_BASE_ADDR is a macro, so after macro...

    RCC_BASE_ADDR is a macro, so after macro replacement, it is as if you had written:

    p = (uint32_t *)(&0x40023800U);
  14. Replies
    7
    Views
    657

    They are not equivalent, so you might want to...

    They are not equivalent, so you might want to change instructor if that's what the instructor told you.

    To elaborate: the second method treats the int value as the address of an int. So pA does...
  15. I'd say no: you do have to define two in the same...

    I'd say no: you do have to define two in the same translation unit as one in order for it to be static/have internal linkage and yet called by one. A compromise solution might be to make use of a...
  16. This is wrong because you have a local variable...

    This is wrong because you have a local variable for the new local: that variable ceases to exist after the function returns. You could make it static, but then all you'll ever have is one variable,...
  17. What is a "pattern"?

    What is a "pattern"?
  18. Replies
    27
    Views
    946

    I don't see why that is so.

    I don't see why that is so.
  19. Replies
    27
    Views
    946

    That's great! If we apply what you wrote to your...

    That's great! If we apply what you wrote to your more complex problem with linked lists though, what you're doing is equivalent to doing deep copying. Granted, in this simplified version it is...
  20. Replies
    27
    Views
    946

    So what I am suggesting is this: attempt a...

    So what I am suggesting is this: attempt a simpler version of what you're trying to solve, and show us how you do it. Forget about linked lists for now, and focus on the notion of implementing...
  21. You're right: they match. It may make no...

    You're right: they match.

    It may make no difference, but I suggest that you remove the using declaration from the header file: fully qualify std::string there instead. In the source file, move the...
  22. Replies
    27
    Views
    946

    Wait. This is an extremely simple version of the...

    Wait. This is an extremely simple version of the complex problem that you're trying to solve. If you cannot implement the simple version, then you have no hope of implementing the complex version, so...
  23. Replies
    27
    Views
    946

    Great, that's good information to work with....

    Great, that's good information to work with. Let's simplify and imagine that you're dealing with this number type:

    typedef struct number
    {
    int value;
    } number;

    number *add(number *x,...
  24. Replies
    27
    Views
    946

    The first thing that I suggest is for you to get...

    The first thing that I suggest is for you to get rid of those typedefs, i.e., this:

    typedef struct node { double coefficient, power;
    struct node *Previous, *Next;
    } *equationList;
    ...
  25. Replies
    27
    Views
    946

    Sure, but you'll have to post the code here. ...

    Sure, but you'll have to post the code here.

    I don't see what's so difficult though. You already have an idea of how identify whether you need to copy, i.e., ask yourself if you need the original...
Results 1 to 25 of 500
Page 1 of 20 1 2 3 4