🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

c++ classes

Started by
0 comments, last by lshadow 24 years, 3 months ago
Can class member functions use functions in other other files? example: a file "integers.cpp" has the function: int GetInt() { return 5; } and is declared in "integers.h" a file "classes.h" has: #include "integers.h" class cint { public: int a; int b; int DoMath(); }; file "classes.cpp" has: int cint::DoMath() { a = GetInt(); b = 2; return a+b; } Just wondering if this is legal.
Working on: DoP
Advertisement
It''s legal.

Jaap Suter
____________________________Mmmm, I''ll have to think of one.

This topic is closed to new replies.

Advertisement