umka
Joined: 28 Aug 2007 Posts: 99 Location: New Zealand
|
SOLVED - Problem with function " strcmp " |
Posted: Sun Mar 30, 2008 6:04 pm |
|
|
Here is the code I am trying to implement, it is the example in the help file but am getting an error : Undefined identifier strcmp.
Using compiler 4.038
Code: | #include <16F877a.H>
#fuses XT, NOWDT, NOPROTECT, BROWNOUT, PUT, NOLVP
#use delay(clock = 4000000)
#use rs232(baud=9600, xmit=PIN_c7, rcv=PIN_c6, BITS =8, PARITY=n, stop=1)
#include <Flex_LCD420.c>
char string[30];
char password[30];
void main()
{
strcpy(password,"mike");
while(true)
{
printf("Password: ");
gets(string);
if(strcmp(string, password))
{
printf("OK");
}
}
} |
Last edited by umka on Sun Mar 30, 2008 6:33 pm; edited 1 time in total |
|