vc++6.0能过,这里不能
#include <iostream>
#include <string>
using namespace std;
class Student
{
public:
Student(){m_strName="";}
Student(string _name){m_strName=_name;}
Stduent(const Student&stu){};
~Student(){};
void setName(string _name)
{m_strName=_name;}
string getName()
{return m_strName;}
private:
string m_strName;
};
int main(void)
{
Student *stu = new Student;
if(stu==NULL)
return 0;
stu->setName("慕课网");
cout<<stu->getName()<<endl;
delete stu;
stu=NULL;
return 0;
}
warning: no newline at end of file
error: ISO C++ forbids declaration of 'Stduent' with no type
