[C] Implement strcpy function

View previous topic View next topic Go down

[C] Implement strcpy function

Post  Admin on Tue Sep 27, 2011 8:32 pm

xtrcpy(string str1, string str2){
char *s1=str1;(target string)
char *s2=str2;(source string)
while(*s2){
*s1=*s2;
s1++;
s2++;
}

cout<<str1;
}

Admin
Admin

Posts : 131
Join date : 2011-08-16

View user profile http://codefornongeek.forumotion.com

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum