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

Where is strcpy function located?

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



Joined: 30 Sep 2010
Posts: 38

View user's profile Send private message

Where is strcpy function located?
PostPosted: Wed Feb 10, 2016 3:19 pm     Reply with quote

Do not see it in STRING.H, Only see strncpy.

SOLVED:

1. STRING.H is NOT required for for strcpy.

2. Be sure to use STRCPY and NOT STRCOPY

You will get function used but not defined error.

Thanks!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Feb 10, 2016 4:05 pm     Reply with quote

There is no source code for it. It's an intrinsic function. I think, after
looking at the .LST file, it's because the compiler authors can hand-code
strcpy much more efficiently in ASM than the compiler can compile it.
Ttelmah



Joined: 11 Mar 2010
Posts: 19260

View user's profile Send private message

PostPosted: Thu Feb 11, 2016 2:20 am     Reply with quote

It's also because it is internally overloaded to support ROM and RAM strings.
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