[C] Implement strcpy function
Page 1 of 1
[C] Implement strcpy function
xtrcpy(string str1, string str2){
char *s1=str1;(target string)
char *s2=str2;(source string)
while(*s2){
*s1=*s2;
s1++;
s2++;
}
cout<<str1;
}
char *s1=str1;(target string)
char *s2=str2;(source string)
while(*s2){
*s1=*s2;
s1++;
s2++;
}
cout<<str1;
}
Similar topics
» Implement a Singleton
» Write a method to implement *,-,/ operations. You should use only the + operator
» Choose data structure to implement insert, get median
» Write a method to implement *,-,/ operations. You should use only the + operator
» Choose data structure to implement insert, get median
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum
|
|