DesignPattern/23.TemplateMethodPattern/2.Code/main.cpp

22 lines
322 B
C++

#include "FingerprintModule.h"
#include <Windows.h>
int main()
{
FingerprintModule *fp = new FingerprintModuleA();
fp->algorithm();
delete fp;
fp = new FingerprintModuleB();
fp->algorithm();
delete fp;
fp = new FingerprintModuleC();
fp->algorithm();
delete fp;
printf("\n\n");
system("pause");
return 0;
}