Category "class-method"

Calling C++ member functions via a function pointer

How do I obtain a function pointer for a class member function, and later call that member function with a specific object? I’d like to write: class Dog

Returning a struct pointer from class method

EDIT: Changed example code to code from my project that doesn't work. I'm writing code in C++, learning templates and got stuck with some problem. There's a cla

Class template with methods already defined

I have two methods inside a class (mask_im and save_im) that I must include in several other classes in separate modules. How can I create a class with those tw

Class template with methods already defined

I have two methods inside a class (mask_im and save_im) that I must include in several other classes in separate modules. How can I create a class with those tw

How to make a class property? [duplicate]

In python I can add a method to a class with the @classmethod decorator. Is there a similar decorator to add a property to a class? I can be