I have an object whose functions I would like to call from with in another class for example
class smo {
int spoon = 10;
smo() {
}
int get_spoon() {
return spoon;
}
}
class boat {
boat() {
}
print_smo(Object test) {
test.get_spoon();
}
}
it tells me that the function get.spoon() does not exists. The error makes sense since the object hasn't been created the function can't be called, but it will exists when its run and I have passed an appropriate object of the type smo to it.