回复 5楼 gq198718
不会把,为什么我的VC就通不过呢。错误如下
error C2440: 'initializing' : cannot convert from 'char [5]' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'char [5]' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'char [5]' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : error C2440: 'initializing' : cannot convert from 'const int' to 'struct Monster'
No constructor could take the source type, or constructor overload resolution was ambiguous
c:\documents and settings\owner.legend-jh4xyv6s\桌面\cpp1.cpp(17) : fatal error C1903: unable to recover from previous error(s); stopping compilation
执行 cl.exe 时出错.