This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]