how can I use a function inside an object?
(the code is too long to put here but here's a replica)
class example {
public:
example();
~example();
void doSomthing() {
afunction();
}
}
void afunction() {
//do more things
}
in this example i wouldnt NEED to use a function but I do need to in my code.
when I try to compile the program I get errors like:
error: 'functionName' was not declared in this scope. and
error: unused variable 'functionName'