CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

SOLVED - Problem with function " strcmp "

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
umka



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

SOLVED - Problem with function " strcmp "
PostPosted: Sun Mar 30, 2008 6:04 pm     Reply with quote

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
umka



Joined: 28 Aug 2007
Posts: 99
Location: New Zealand

View user's profile Send private message

PostPosted: Sun Mar 30, 2008 6:32 pm     Reply with quote

Problem solved didnt have #include string.h
mariachi_1980



Joined: 27 Jan 2011
Posts: 3

View user's profile Send private message

PostPosted: Thu Jan 27, 2011 12:59 pm     Reply with quote

umka wrote:
Problem solved didnt have #include string.h


Why your code doesn't work between two pics?

That's works from PC to PIC but doesn't from PIC to PIC



Please, i need response
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group