A.h file
class A{
public:
static int* func (int &b);
}
A.cpp
int* A::func(int &b){
//some definition here
}
I am calling the above function in some other file. I have included the .h file in that. When I try to compile I get the following error
undefined reference to A::func(int &)
A.cpp(let's call itA.obj) to your linker?A::func()asprivate! The link error could be due to not linkingA.ofile.namespace Something { ... }?