This topic is now archived and is closed to further replies.


How can i use a global function in a class?

Recommended Posts

What do u mean a global function, do u mean one defined in another class or part of the program away from ur code. If u mean a function defined in your class then u just give the name for example

suppose the class Test exists

void Test::function ()
// call another function in my class Test

// or call it by this

// or by ''this''


has for pointers to functions I cannot really remember how to do that

Hope I have helped in anyway

calling a function from another class or ur main program with your function, I dont really know how try calling it the normal way by including the header of the source file it exists in

Dark Star

Share this post

Link to post
Share on other sites