I know this wont compile, but is it possible to do something like this? The idea is say I wanted to create a data base of students. Each student object has certain data in it like in this case an age, name and height. Then in the Data class I want to have a method that would return (or use) whichever function called from the student class that was passed to it
If you explained what you were really trying to achieve, rather than how to do something we don't know why - we probably will be able to provide better info.