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

25 lines
367 B
C++

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