Re: Struggling with API QDFRTVFD
Barbara Morris <[email protected]>
| Newsgroups | gmane.comp.lang.as400.c |
|---|---|
| Message-ID | <[email protected]> |
On 2014-08-19 09:10, Frank Kolmann wrote: > > This is and example of the compile error I am getting. > 218 17 | if (strncmp(p_QDFFFINF->WDFFFIOA, Attrib, 1) == 0) > *=SEVERE==========> a - CZM0280 Function argument assignment between types > "const char*" and "char" is not allowed. >... > However there are other uses of strncmp in the program that compile just > fine. > for example. > > 254 5 | if (strncmp(p_QDFARFTE->WDFARFNM,MyRec,10) == 0) The CZM0280 is telling you that you can't pass a char where a const char * is wanted. The reason that WDFARFNM works in the strncmp is that WDFARFNM is a char array, aka char *. WDFFFIOA is just a char. So as Scott says, you can just compare it directly to 0x01. -- Barbara -- This is the Bare Metal Programming IBM i (AS/400 and iSeries) (C400-L) mailing list To post a message email: C400-L-Zwy7GipZuJhWk0Htik3J/[email protected] To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/mailman/listinfo/c400-l or email: C400-L-request-Zwy7GipZuJhWk0Htik3J/[email protected] Before posting, please take a moment to review the archives at http://archive.midrange.com/c400-l.