Is it possible to create functions and use them in a separate file?

Jan 31, 2013 at 12:57am
HI! I'm just curious to know that is it possible to make functions in a separate source file and use them? If it is, how do I do it?
Jan 31, 2013 at 1:42am
Yes, read this:

http://www.cplusplus.com/doc/tutorial/classes/


The C approach is to use the extern keyword, and include the header file.

http://en.wikipedia.org/wiki/External_variable


However, try to stick to the C++ stuff, unless you have to write C. Try to avoid mixing C++ and C.

Hope all goes well.
Jan 31, 2013 at 2:08am
YOU DA MAN, IDEASMAN!
Jan 31, 2013 at 2:08am
THANK YOU!
Jan 31, 2013 at 5:05am
No worries - any time. I wish the rest of my life was that easy!!
Topic archived. No new replies allowed.