I am stuck up with a piece of code, which I am not able to break. Could you kindly help me out.
Situation:
I am trying to perform a string comparison between 2 variables, one defined as const TCHAR * and other defined as CS_CHAR, inside an Embedded SQL program in C++. My relevant code snippet is as below:
Code:
short CSQLBox::fnTest(const TCHAR *varInput)
{
CS_CHAR szExtract;
//szExtract variable is populated by Embedded SQL query
....
//Do string comparison
if(strcmp(szExtract, varInput)==0)
{
...
}
}
I have tried typecasting parameter 1 as:
Code:
if(strcmp((const char*)szExtract, varInput)==0)
Could anyone kindly offer me some suggestions.
cheers,
sanK

