How can I use a function that is defined in another class, for example I want to use a funcion that is defined in a class, from the main() function ?
You mean this:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
|
class Object
{
public:
// ...
void Function(void)
{
//...
}
};
int main(void)
{
::Object New_obj;
New_obj.Function();
return(0);
}
|
Edit: Ninja'd by Moschops :)
Wazzak
Last edited on
Taran Gadal: I know, I just like to be explicit about where a type is situated.
Wazzak
Thank you both guys!
What I love about this forum is the "speed of light answers" lol :D
Very good! :)