c++ linker error : undefined reference to a static function

前端 未结 1 1963
[愿得一人]
[愿得一人] 2021-01-26 04:36

A.h file

class A{
      public:
      static int* func (int &b);
}

A.cpp

int* A::func(int &b){
   //some definition her         


        
相关标签:
1条回答
  • 2021-01-26 05:11

    The code looks right.

    The first thing to check is that your build environment compiled and linked in A.cpp.

    0 讨论(0)
提交回复
热议问题