Search:

Type: Posts; User: antred

Page 1 of 11 1 2 3 4

Search: Search took 0.01 seconds.

  1. Replies
    5
    Views
    21,033

    You're invoking the makeChicken() method on the...

    You're invoking the makeChicken() method on the class type Chef. You want to invoke it on the chicken instance.

    P.S. Also, you probably shouldn't name your chef "chicken". Maybe "chef" would be a...
  2. Replies
    3
    Views
    3,836

    void setName(string nameofCourse){ ...

    void setName(string nameofCourse){
    nameofCourse = name
    }


    Shouldn't this be:



    void setName(string nameofCourse){
  3. Replies
    3
    Views
    780

    Additionally, the precise nature of the output...

    Additionally, the precise nature of the output files may also depend on what compiler you're using. Code Block is not a compiler; it's an IDE that can work with almost any compiler under the sun.
  4. Replies
    13
    Views
    2,977

    You made a tiny but important typo there. I think...

    You made a tiny but important typo there. I think you meant:



    tmp.b += s2;
    return tmp;
  5. Replies
    10
    Views
    1,391

    That was sarcasm, yes? If so, you'd best say so...

    That was sarcasm, yes? If so, you'd best say so or else someone might read your post and actually believe it. :p
  6. Thread: Freeing memory

    by antred
    Replies
    11
    Views
    1,072

    By all means, you should follow Eylsia's advice...

    By all means, you should follow Eylsia's advice and use RAII (RAII) to manage your resources. Avoid doing it manually where ever possible. But to get back to your potential leak. If you still suspect...
  7. Thread: regular in c

    by antred
    Replies
    13
    Views
    1,135

    Well, yeah, but wouldn't a higher level language...

    Well, yeah, but wouldn't a higher level language essentially do the same thing? Seeing as the smallest addressable unit is always a byte, they too would have to operate on bytes rather than on...
  8. Thread: regular in c

    by antred
    Replies
    13
    Views
    1,135

    What do you mean by that? Aren't bitwise...

    What do you mean by that? Aren't bitwise operators in C++ good enough?
  9. Thread: Old articles

    by antred
    Replies
    9
    Views
    760

    Go back and fix it, I'll edit the quote. :0

    Go back and fix it, I'll edit the quote. :0
  10. Thread: Old articles

    by antred
    Replies
    9
    Views
    760

    A valid point. There may be a reason why the OP...

    A valid point. There may be a reason why the OP really has to use the Win-API directly, but more likely than not he's probably just not aware that there are superior alternatives. There's very little...
  11. Only programmers could debate so hard over...

    Only programmers could debate so hard over something so trivial. :p
  12. Replies
    7
    Views
    1,139

    I wasn't aware of that. :) Then again, isn't this...

    I wasn't aware of that. :) Then again, isn't this really just an extension of the other rule, since the base class part of a derived class is sort of a member of it, too?


    EDIT: Ok, I was really...
  13. Replies
    7
    Views
    1,139

    Which is also the only difference between a class...

    Which is also the only difference between a class and a struct, just to mention it. :)
  14. Replies
    12
    Views
    1,006

    Holy crap, now I wish I hadn't. :o

    Holy crap, now I wish I hadn't. :o
  15. Thread: Timer in C++

    by antred
    Replies
    16
    Views
    1,869

    Not to mention that the time()-function referred...

    Not to mention that the time()-function referred to by WalterP does exactly nothing to solve the OP's problem.
  16. Replies
    11
    Views
    2,138

    If you're actually worried about not being able...

    If you're actually worried about not being able to quickly glance where a local variable is initialized, that's a sure indicator that your function is too long. Time for some refactoring. Break it...
  17. Replies
    18
    Views
    1,332

    It's just a typedef, usually for std::size_t,...

    It's just a typedef, usually for std::size_t, which in turn is usually just a typedef for unsigned int.
  18. Thread: regular in c

    by antred
    Replies
    13
    Views
    1,135

    I suppose it might be possible by using some...

    I suppose it might be possible by using some bit-shifting trickery (maybe not ... I haven't really thought about it).
  19. Replies
    5
    Views
    1,461

    Well, apparently this is going to be changed for...

    Well, apparently this is going to be changed for C++14, as the overloads taking 4 iterators instead of 3 all have a little "since C++14" next to them on cppreference.com.
  20. Replies
    5
    Views
    1,461

    is_permuation...

    is_permuation



    EDIT: In other words, it is assumed that the 2nd sequence has the same length as the first.
  21. Replies
    5
    Views
    730

    By the way, at the moment you're declaring all...

    By the way, at the moment you're declaring all variables used in your main function at the top of the function. Don't do that. That isn't the C++ way, in fact it's not even the modern C way anymore....
  22. Thread: Timer in C++

    by antred
    Replies
    16
    Views
    1,869

    That depends entirely on what GUI-Framework...

    That depends entirely on what GUI-Framework you're using. MFC will do this differently than Qt, which in turn does it differently than wxWidgets, etc.
  23. Replies
    9
    Views
    1,771

    Um, yeah, I'm aware of that. That's the whole...

    Um, yeah, I'm aware of that. That's the whole point of me suggesting that he use std::lock_guard instead of doing it manually. :p
  24. Replies
    168
    Views
    28,754

    Ah, ok. Sorry, didn't read through the entire...

    Ah, ok. Sorry, didn't read through the entire thread (it's rather long). :)
  25. Replies
    9
    Views
    1,771

    Hate to quote myself, but apparently I can no...

    Hate to quote myself, but apparently I can no longer edit my post. Obviously I meant what happens if something throws an exception after you've locked the mutex but before you've unlocked it?
Results 1 to 25 of 258
Page 1 of 11 1 2 3 4