cannot convert parameter 1 from 'char' to 'const char *'

// ss.cpp : Defines the entry point for the console application.<br />//<br /><br />#include &quot;stdafx.h&quot;<br />#include&quot;string.h&quot;<br />#include&quot;iostream.h&quot;<br />class student //定义类<br />{<br /> public:<br /> void input(int n,char na,float s)<br /> {<br /> number=n;<br /> score=s; name=new char [strlen(na)+1];<br /> strpy(name,na);<br /> }<br /> void modify (float s)//成员函数定义<br /> {score=s;}<br /> void display()<br /> {<br /> cout&lt;&lt;&quot;&#92;n number:&quot;&lt;&lt;number;<br /> cout&lt;&lt;&quot;&#92;n name:&quot;&lt;&lt;name;<br /> cout&lt;&lt;&quot;&#92;n score:&quot;&lt;&lt;score;<br /> }<br />private:<br /> int number;<br /> char *name;<br /> float score;<br />};<br />void main()<br />{<br /> student ss;//声明对象<br /> char na[]=&quot;liu meng&quot;;<br /> ss.input =(9901,na,88.5);<br /> ss.display ();<br />}
strpy(name,na);
仔细看看这两个变量的类型
strpy(name,na);
仔细看看这两个变量的类型
http://zhidao.baidu.com/question/69303745.html