Advertisement

c++ classes

Started by March 23, 2000 10:08 AM
0 comments, last by lshadow 24 years, 6 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
It''s legal.

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

This topic is closed to new replies.

Advertisement