I am learning C ++ (from java) and recently discovered that you can pass functions. This is really great and I think it is very useful. Now I was thinking about how I can use this, and one of the ideas that came to my mind was a fully customizable class.
The best example of my train, although for fully customizable classes (code), could be called a human class. The person will have all the functions related to P. Later, the person can take the sword (S), so now the person has access to all functions related to both P and S.
Are there any limitations or performance issues? Is it careless and just frowned?
Any insight is educational, thanks.
~ aedona
source
share