class A {
public:
virtual int test()=0;
};
class B : public A {
public:
int test(){return 10;}
};
B *b = new B();
b->test(); // would return 10;
而: class A {
public:
我想從NHibernate的SqlClientBatchingBatcher類繼承的正是這樣(從TooManyRowsAffectedException with encrypted triggers採取代碼): public class NonBatchingBatcherWithoutVerification : SqlClientBatchingBatcher
{
public
我的問題是訪問從嵌套成員的抽象超類的成員(類或結構),另一個派生類 的例如: public abstract class DataAccessLayer {
public DataAccessLayer(string _connectionString) { //some code }
//some member functions
}
另一班從這個類派生