大家来分析一下以下程序的错误之处。
程序如下:#include<stdio.h>
void main()
{
char c[5],b[3];
c[5]="askda";
b[3]="jhj";
strpy(c,b);
printf("%s",c[5]);
}
编译连接后vc+6.0提示错误:
Deleting intermediate files and output files for project 'Cpp1 - Win32 Debug'.
--------------------Configuration: Cpp1 - Win32 Debug--------------------
Compiling...
Cpp1.cpp
e:\c++临时文件\cpp1.cpp(5) : error C2440: '=' : cannot convert from 'char [6]' to 'char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
e:\c++临时文件\cpp1.cpp(6) : error C2440: '=' : cannot convert from 'char [4]' to 'char'
This conversion requires a reinterpret_cast, a C-style cast or function-style cast
e:\c++临时文件\cpp1.cpp(7) : error C2065: 'strpy' : undeclared identifier
Error executing cl.exe.
Cpp1.exe - 3 error(s), 0 warning(s)
上面的提示我看不懂,请问各位到底是如何分析呢?