Small problem: If I have a function (int name(int x)) that I wish to use in all my cpp files, in the same project, where should I declar it???
Small problem: If I have a function (int name(int x)) that I wish to use in all my cpp files, in the same project, where should I declar it???
CyBBe
It is considered back practice, so I suggest you redesign your program a bit. But here is how...
you can use 'extern'.
For each source file that needs to call the function, put this at the top:
For the one source that defines the function:Code :extern int name(int x);
/skw|dCode :int name( int x ) { // stuff }
-= skwid@QuakeRally.com =-
uh huh. and isn't this off-topic?
(OpenGL != C++ != language semantics)