static function pointer array access function : error LNK2001: unresolved external sy
- From: visu_l <visu_l.1yh4gl@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 14 Nov 2005 10:16:27 +0530
Hi ,
I have a class e, which has an array of function pointers. the code has
been posted below. the code doesnt compile. the error shown is
ERROR LNK2001: UNRESOLVED EXTERNAL SYMBOL \"PUBLIC: STATIC INT
(__CDECL*(* E::E_FUNC_PTR)[18])(INT)\"
(?E_FUNC_PTR@E@@2PAY0BC@P6AHH@ZA)
could any one suggest what is wrong with it.
Thanks & Regards,
visu
E.H:
typedef int (*fptr)(int);
class executer_t
{
private:
int i;
static fptr e_func_ptr[18][18];
public:
e();
static fptr get_e_func_ptr(int cd, int cd_len);
static int init_e_func_ptr();
};
E.CPP:
#include "e.h"
fptr e_func_ptr[18][18];
e::e(){
//constructor
}
fptr e::get_e_func_ptr(int cd, int cd_len){
return e::e_func_ptr[cd_len][cd]; //return an element of the static
function pointer array
}
int e::init_e_func_ptr(){
//code for initializing the static array...yet to be
coded
return 0;
}
--
visu_l
------------------------------------------------------------------------
visu_l's Profile: http://www.techenclave.com/forums/member.php?u=2108
View this thread: http://www.techenclave.com/forums/showthread.php?t=56958
The Tech SuperSite for India - www.techenclave.com
.
- Follow-Ups:
- Prev by Date: Re: STL Vector Clear causes crash in DLL
- Next by Date: Re: STL Vector Clear causes crash in DLL
- Previous by thread: Re: How to make a library ??
- Next by thread: Re: static function pointer array access function : error LNK2001: unresolved external sy
- Index(es):
Relevant Pages
|