We need to implement a C++ function which should be a member of a class. The function should take any data type in it's argument. Also, the data type can be anything, int, float, char, or any other class object. If it is a class object we should be able to collect data members of this received argument.
Please let me know how to achieve this functionality.