关于纯虚函数的问题。。。求高手看下。。
#include "stdafx.h"#include <string>
using namespace std;
class Human
{
public:
string work;
Human();
~Human();
virtual string work() = 0;
};
class Student:public Human
{
public:
Student(string a);
string work();
};
virtual string work() = 0
这句话错在那里了error C2040: 'work' : 'class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > (void)' differs in levels of indirection from 'class std::basic_string<char,struct std::char_traits<char>,cl
这个错误我没见过。。。按照书上操作的呀。。