error LNK2001: unresolved external symbol "void __cdecl copy_string(char * const,char * const)"

# include <stdio.h>
void main()
{
void copy_string(char form[], char to[]);
char from[]="I am a teacher.";
char to[]="You are a student.";
char *a=from, *b=to;
printf("string a=%s\nstring b=%s\n", a, b);
printf("copy string a to string b:\n");
copy_string(a, b);
printf("string a=%s\nstring b=%s\n", a, b);
}

void copy_string(char *from, char *to)
{
for (;*from!='\0'; from++, to++)
*to=*from;
*to='\0';
}

--------------------Configuration: example-3用字符指针变量作形参 - Win32 Debug--------------------
Linking...
example-3用字符指针变量作形参.obj : error LNK2001: unresolved external symbol "void __cdecl copy_string(char * const,char * const)" (?copy_string@@YAXQAD0@Z)
Debug/example-3用字符指针变量作形参.exe : fatal error LNK1120: 1 unresolved externals
执行 link.exe 时出错.

这是什么意思啊?该怎么改?
问题很明显,你定义的是数组
char from[]="I am a teacher.";
char to[]="You are a student.";,
但是你的函汪盯数for (;*from!='\0'; from++, to++) *to=*from;这里不租陵盯能用++,数组是常量弊和,指针是变量,你混淆了。
# include <stdio.h>
void main()
{
void copy_string(char *from, char *to); //这里声明与函搭岩数定义不一致坦枝者!改成指针就可以了!
char 让薯from[]="I am a teacher.";
char to[]="You are a student.";
char *a=from, *b=to;

printf("string a=%s\nstring b=%s\n", a, b);
printf("copy string a to string b:\n");
copy_string(a, b);
printf("string a=%s\nstring b=%s\n", a, b);
}

void copy_string(char *from, char *to)
{
for (;*from!='\0'; from++, to++)
*to=*from;
*to='\0';
}