The error message indicates that you are not giving the right number of
arguments to strstr.
We cannot make progress without looking at your code.
Rene Brun
Borse, Ganesh wrote:
>
> Hi,
>
> I am trying to "Define" an expression to check whether a long char
> string contains another small char string.
> For this, I am using strstr() library function in C++.
>
> Expression is like this:
> THaVarList * gHaVars = new THaVarList();
> THaCutList * gHaCuts = new THaCutList(gHaVars);
> const char* listClients="ABCD,EFGH,HIJK,NEWONE,JUNK,DONE";
> const char* ordClient = "DONE";
> gHaVars->Define("listClients",listClients);
> gHaVars->Define("ordClient",ordClient);
> gHaCuts->Define("Expr","((size < 1000) && (vol < (0.001 * ADV)) &&
> (prod == value) && strstr(listClients,ordClient) )");
>
> Program compiles fine, but when I run this program, the Define()
> function call fails with an error message:
> Error in <THaCut::Compile>: strstr requires 2 string arguments
> Error in <THaCutList::Define>: expression error, cut not created: Expr
> ((size < 1000) && (vol < (0.001 * ADV)) && (prod == value) &&
> strstr((listClients),(ordClient)) ) block: Default
>
> I have given the correct number & type of input parameters to strstr,
> but then why is the "::Compile" still failing?
> How can we achieve this type of checks?
>
> Please help.
>
> Thanks and Regards,
> Ganesh
>
> ==============================================================================
> Please access the attached hyperlink for an important electronic communications disclaimer:
>
> http://www.credit-suisse.com/legal/en/disclaimer_email_ib.html
> ==============================================================================
>
Received on Thu Nov 29 2007 - 09:26:02 CET
This archive was generated by hypermail 2.2.0 : Thu Nov 29 2007 - 11:50:02 CET