Does not work strcpy() function. -> incompatible implicit declaration of strcpy......
I have a problem with the strcpy function. i think that we use it like this but there is a mistake...why?
Is this wrong?
Code:
strcpy(new_buf, old_buf);
if i want to put the old_buf="hi_my_old_man" into the new_buf which is empty in the beginning.
Code:
#include <stdio.h>
#include <stdlib.h>
int main(void)
{
int choice;
char buf[40];
printf("Before strcpy: %s\n", buf);
strcpy(buf,"This is the end my friend");
printf("After: %s\n", buf);
return 0;
}