I need to make a function that receives two char pointers and copies the contents of one into the other, and then returns the beginning of the pointer. I have been messing with this for a couple hours now and have read 100 examples that are all different. Here is what I have right now:
char * mystrcpy(char * dest, char * src) {
while(1) {
if(*src == '\0') {
*dest = '\0';
return dest;
}
else {
*dest = *src;
*src++;
*dest++;
}
}