This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Help needed - cannot convert void* to const void*
- From: R Nagamanickam <rnm_75 at yahoo dot com>
- To: gcc at gcc dot gnu dot org
- Cc: rnm_75 at yahoo dot com
- Date: Tue, 15 Jul 2003 22:37:34 -0700 (PDT)
- Subject: Help needed - cannot convert void* to const void*
Hi,
I am getting this error, when i try to compile my
program. (gcc 2.98).
Test.cpp: In method `STATUS CSession::CompSchema
(const WCHAR
*, DataAttribute *)':
Test.cpp:4080: cannot convert `int (*) (void *, void
*)' to `int
(*) (const void *, const void *)' for argument `5' to
`bsearch (const
void *, const void *, unsigned int, unsigned int, int
(*) (const void
*, const void *))'
Test.cpp: In method `STATUS CSession::GetSchema ()':
Test.cpp:4400: cannot convert `int (*) (void *, void
*)' to `int
(*) (const void *, const void *)' for argument `4' to
`qsort (void *,
unsigned int, unsigned int, int (*) (const void *,
const void *))'
make: *** [Test.o] Error 1
here is the code:
-------
bsearch((void *) pDV->uValue.sValue, (void *) mGFT,
mNFE, sizeof(sFldD), FDF))
EXTERN_C int FDF( const void *arg1, const void *arg2 )
{
SFD *pFD;
LPCWSTR sName = (LPCWSTR) arg1;
pFD = (SFD *) arg2;
return wcsicmp(sName, pFD->sFN);
}
-----------
Any help would be fine.
Thanks.
Suresh
__________________________________
Do you Yahoo!?
SBC Yahoo! DSL - Now only $29.95 per month!
http://sbc.yahoo.com