c++ classes
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
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement