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 support@ccsinfo.com

how to implement strstr between ram and rom strings (SOLVED)

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



Joined: 01 Dec 2010
Posts: 4

View user's profile Send private message

how to implement strstr between ram and rom strings (SOLVED)
PostPosted: Wed Dec 01, 2010 8:01 am     Reply with quote

I'm trying to port a code I made in Hitech C to CCSC

Code:
if (strstr(SerialBuff, "stringtofind") != 0)
         break;


Above code is workingin hitech c. SerialBuff is a string received from uart.

When I compile, I get the following error

Code:
Attempt to create a pointer to a constant


So how do I convert the above code or what is the equivalent code in CCSC?


Last edited by ambokyo on Wed Dec 01, 2010 9:13 am; edited 1 time in total
Wayne_



Joined: 10 Oct 2007
Posts: 681

View user's profile Send private message

PostPosted: Wed Dec 01, 2010 8:03 am     Reply with quote

Try #device PASS_STRINGS=IN_RAM
ambokyo



Joined: 01 Dec 2010
Posts: 4

View user's profile Send private message

PostPosted: Wed Dec 01, 2010 8:14 am     Reply with quote

Wow!, the error disappeared!

Thank you so much.
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