如题.

解决方案 »

  1.   

    The specifier cannot appear with a function definition outside of a class declaration. The virtual specifier can be specified only on a member function declaration within a class declaration.The following sample generates C2723:// C2723.cpp
    struct X {
       virtual void f();
       virtual void g();
    };virtual void X::f() {}   // C2723// try the following line instead
    void X::g() {}
      

  2.   

    struct X {
       virtual void f();
       virtual void g();
    };
    毛病出在这里