Search:

Type: Posts; User: Elysia

Search: Search took 0.13 seconds.

  1. Replies
    29
    Views
    7,158

    Oh, okay. Then check the books thread. If you...

    Oh, okay. Then check the books thread.
    If you haven't checked out Accelerated C++, then you should probably do that too.
    It doesn't cover just the basics; it covers a lot of more and a lot of it is...
  2. Replies
    29
    Views
    7,158

    Not much about boost, sadly. There is one book...

    Not much about boost, sadly.
    There is one book about boost, I think. Can't remember its name. It's somewhat old and doesn't cover that much, but it's about the only one available or so. A search on...
  3. Replies
    29
    Views
    7,158

    It doesn't work that way! Just pass what...

    It doesn't work that way! Just pass what boost::bind returns directly to your function.
    You need to download the boost package, yes, but you don't need to install any dlls to use it. However, you...
  4. Replies
    29
    Views
    7,158

    Oh? Then let's borrow the power of boost::bind a...

    Oh? Then let's borrow the power of boost::bind a little more:
    example( boost::bind(&ExClass::func, f, 10) );
    Notice that I put a number in there as well.
    Now
    func();
    Simply will work.
    Praised...
  5. Replies
    29
    Views
    7,158

    Ah, that's because the function takes an int, but...

    Ah, that's because the function takes an int, but we don't pass one. You can fix it like:
    (Class.*FncPtr)(10);
    func(10);
  6. Replies
    29
    Views
    7,158

    Alright, cool, no worries about that then.

    Alright, cool, no worries about that then.
  7. Replies
    29
    Views
    7,158

    Aww, come on. It's not that big and complicated....

    Aww, come on. It's not that big and complicated.
    So this actually compiles, where you try to return "void"?
  8. Replies
    29
    Views
    7,158

    I'm just concerned about returning void from the...

    I'm just concerned about returning void from the FncPtr call.


    That's why there are two overloads! One for const, one for non-const.
    It's critical if we pass the object through a const...
  9. Replies
    29
    Views
    7,158

    In that case, I'll throw in another, better...

    In that case, I'll throw in another, better example:

    class ExClass
    {
    public:
    int func(const int& z); //***
    };

    int ExClass::func(const int& z) { return z; }
  10. Replies
    29
    Views
    7,158

    Two examples. One using boost, the other without...

    Two examples.
    One using boost, the other without boost.

    class ExClass
    {
    public:
    int func(const int& z); //***
    };

    int ExClass::func(const int& z) { return z; }
Results 1 to 10 of 10