acl/lib_acl_cpp/samples/final_class/final_class.cpp

41 lines
639 B
C++
Raw Normal View History

// final_class.cpp : 定义控制台应用程序的入口点。
2014-11-19 00:25:21 +08:00
//
#include "stdafx.h"
#include <stdio.h>
#include "acl_cpp/stdlib/final_tpl.hpp"
//#include "lib_acl.hpp"
class CMyFinalClass : public acl::final_tpl<CMyFinalClass>
{
public:
CMyFinalClass(int n) : dummy_(n) {}
~CMyFinalClass() {}
void Test()
{
printf("hello, I'm the final class\n");
}
protected:
private:
int dummy_;
};
class CMyClass //: CMyFinalClass
{
public:
CMyClass() {}
~CMyClass() {}
};
int main(void)
{
CMyFinalClass m(1);
m.Test();
printf(">>enter any key to exit ...\n");
getchar();
return 0;
}